[extensions-web] python3: fixed json.loads() usage



commit 4e49f633c7ab09d9d398163a0893239c3cdf7812
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Fri Jan 11 19:27:46 2019 +0400

    python3: fixed json.loads() usage

 sweettooth/extensions/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index dd37751..ce00d8a 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -265,7 +265,7 @@ def parse_zipfile_metadata(uploaded_file):
         raise InvalidExtensionData("Zip file is too large")
 
     try:
-        metadata = json.loads(zipfile.open('metadata.json', 'r'))
+        metadata = json.load(zipfile.open('metadata.json', 'r'))
     except KeyError:
         # no metadata.json in archive, raise error
         raise InvalidExtensionData("Missing metadata.json")


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