[gimp-web/migrate/py3] Fix for creating an OrderedDict for GIMP_VERSIONS



commit f87ac5228d3e3cf3dfb4dcc4a0c1eb8e6fa28ba6
Author: Pat David <patdavid gmail com>
Date:   Sun Jul 14 16:41:20 2019 -0500

    Fix for creating an OrderedDict for GIMP_VERSIONS
    
    GIMP_VERSIONS was not being parsed _in order_ (it's ok, this is
    expected behavior for parsing JSON).
    
    So we bring in `OrderedDict` from collections and it works again.
    
    (Note, this is what we had done previously for py2.7, I had just
    stopped using it when migrating.)

 pelicanconf.local.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pelicanconf.local.py b/pelicanconf.local.py
index df557612..8e5db33d 100644
--- a/pelicanconf.local.py
+++ b/pelicanconf.local.py
@@ -154,7 +154,7 @@ CACHE_CONTENT = True
 import json
 from collections import OrderedDict
 with open('GIMP_VERSIONS') as data:
-    GIMP = json.load(data)
+    GIMP = json.load(data, object_pairs_hook=OrderedDict)
 
 if 'STABLE' in GIMP:
     # Set the current stable GIMP version from


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]