aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/utils.py')
-rwxr-xr-xpyaggr3g470r/utils.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/pyaggr3g470r/utils.py b/pyaggr3g470r/utils.py
index 50549587..336ec804 100755
--- a/pyaggr3g470r/utils.py
+++ b/pyaggr3g470r/utils.py
@@ -133,15 +133,12 @@ def import_opml(email, opml_content):
db.session.commit()
return nb
-def import_json(email, json_file):
+def import_json(email, json_content):
"""
Import an account from a JSON file.
"""
user = User.query.filter(User.email == email).first()
- json_string = ""
- with open(json_file, "r") as account:
- json_string = account.read()
- json_account = json.loads(json_string)
+ json_account = json.loads(json_content)
nb_feeds, nb_articles = 0, 0
# Create feeds
bgstack15