Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
Add call to generateEmptyJson to the loadJson method
Browse files Browse the repository at this point in the history
  • Loading branch information
BenHargreaves committed Oct 25, 2018
1 parent f34fb17 commit 643137d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def addUser(userID, userName, filename):
json.dump(data, f)

def loadjson(filename):
# make sure Json files are properly created before loading.
generateEmptyJson()
with open(filename + '.json') as f:
data = json.load(f)
if filename == "suggestion" or filename == 'todo':
Expand Down

0 comments on commit 643137d

Please sign in to comment.