[gimp-web/wip/Jehan/gimp-versions: 2/2] pelicanconf: process the new gimp_versions.json format.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web/wip/Jehan/gimp-versions: 2/2] pelicanconf: process the new gimp_versions.json format.
- Date: Sat, 4 Jan 2020 22:33:50 +0000 (UTC)
commit d429e4c1285288ca6ec0f385c0eddc4df2b14d58
Author: Jehan <jehan girinstud io>
Date: Sat Jan 4 23:32:41 2020 +0100
pelicanconf: process the new gimp_versions.json format.
See previous commit and #168.
pelicanconf.local.py | 21 +++++++++++----------
pelicanconf.py | 16 ++++++++--------
pelicanconf.testing.py | 21 +++++++++++----------
3 files changed, 30 insertions(+), 28 deletions(-)
---
diff --git a/pelicanconf.local.py b/pelicanconf.local.py
index b5dddd8d..3712abbe 100644
--- a/pelicanconf.local.py
+++ b/pelicanconf.local.py
@@ -151,11 +151,11 @@ with open('content/gimp_versions.json') as data:
if 'STABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION = GIMP['STABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION = GIMP['STABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION = GIMP_VERSION[:GIMP_VERSION.index('.', GIMP_VERSION.index('.') + 1)]
- for version, info in GIMP['STABLE'].iteritems() :
+ for info in GIMP['STABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE
@@ -200,11 +200,11 @@ else:
if 'OLDSTABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION_OLDSTABLE= GIMP_VERSION_OLDSTABLE[:GIMP_VERSION_OLDSTABLE.index('.',
GIMP_VERSION_OLDSTABLE.index('.') + 1)]
- for version, info in GIMP['OLDSTABLE'].iteritems() :
+ for info in GIMP['OLDSTABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE_OLDSTABLE
@@ -231,8 +231,9 @@ else:
if 'DEVELOPMENT' in GIMP:
# development version
- GIMP_VERSION_DEVELOPMENT = GIMP['DEVELOPMENT'].keys()[0]
- for version, info in GIMP['DEVELOPMENT'].iteritems() :
+ GIMP_VERSION_DEVELOPMENT = GIMP['DEVELOPMENT'][0]['version']
+ for info in GIMP['DEVELOPMENT'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE_DEVELOPMENT
diff --git a/pelicanconf.py b/pelicanconf.py
index 1b21037c..a9ecb364 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -138,11 +138,11 @@ with open('content/gimp_versions.json') as data:
if 'STABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION = GIMP['STABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION = GIMP['STABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION = GIMP_VERSION[:GIMP_VERSION.index('.', GIMP_VERSION.index('.') + 1)]
- for version, info in GIMP['STABLE'].iteritems() :
+ for info in GIMP['STABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE
@@ -186,11 +186,11 @@ else:
if 'OLDSTABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION_OLDSTABLE= GIMP_VERSION_OLDSTABLE[:GIMP_VERSION_OLDSTABLE.index('.',
GIMP_VERSION_OLDSTABLE.index('.') + 1)]
- for version, info in GIMP['OLDSTABLE'].iteritems() :
+ for info in GIMP['OLDSTABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE_OLDSTABLE
diff --git a/pelicanconf.testing.py b/pelicanconf.testing.py
index b9ded5e0..4e7cb716 100644
--- a/pelicanconf.testing.py
+++ b/pelicanconf.testing.py
@@ -138,11 +138,11 @@ with open('content/gimp_versions.json') as data:
if 'STABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION = GIMP['STABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION = GIMP['STABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION = GIMP_VERSION[:GIMP_VERSION.index('.', GIMP_VERSION.index('.') + 1)]
- for version, info in GIMP['STABLE'].iteritems() :
+ for info in GIMP['STABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE
@@ -186,11 +186,11 @@ else:
if 'OLDSTABLE' in GIMP:
# Set the current stable GIMP version from
# the GIMP_VERSIONS json file. The most
- # current version _should_ be the first key
- # hence, .keys()[0]
- GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'].keys()[0]
+ # current version _should_ be the first key.
+ GIMP_VERSION_OLDSTABLE = GIMP['OLDSTABLE'][0]['version']
GIMP_MAJOR_MINOR_VERSION_OLDSTABLE= GIMP_VERSION_OLDSTABLE[:GIMP_VERSION_OLDSTABLE.index('.',
GIMP_VERSION_OLDSTABLE.index('.') + 1)]
- for version, info in GIMP['OLDSTABLE'].iteritems() :
+ for info in GIMP['OLDSTABLE'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE_OLDSTABLE
@@ -217,8 +217,9 @@ else:
if 'DEVELOPMENT' in GIMP:
# development version
- GIMP_VERSION_DEVELOPMENT = GIMP['DEVELOPMENT'].keys()[0]
- for version, info in GIMP['DEVELOPMENT'].iteritems() :
+ GIMP_VERSION_DEVELOPMENT = GIMP['DEVELOPMENT'][0]['version']
+ for info in GIMP['DEVELOPMENT'] :
+ version = info['version']
if 'date' in info:
try:
RELEASE_DATE_DEVELOPMENT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]