forked from indymedia/epicyon
savejson error handling
parent
e7f377698a
commit
a65b8bf644
4
utils.py
4
utils.py
|
@ -21,8 +21,8 @@ def saveJson(jsonObject: {},filename: str) -> bool:
|
||||||
with open(filename, 'w') as fp:
|
with open(filename, 'w') as fp:
|
||||||
commentjson.dump(jsonObject, fp, indent=2, sort_keys=False)
|
commentjson.dump(jsonObject, fp, indent=2, sort_keys=False)
|
||||||
return True
|
return True
|
||||||
except commentjson.JSONLibraryException as e:
|
except:
|
||||||
print('WARN: saveJson '+str(e))
|
print('WARN: saveJson')
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
tries+=1
|
tries+=1
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue