forked from indymedia/epicyon
savejson error handling
This commit is contained in:
1 parent
e7f377698a
commit
a65b8bf644
1 file changed
+2
-2
@@ -21,8 +21,8 @@ def saveJson(jsonObject: {},filename: str) -> bool:
|
||||
with open(filename, 'w') as fp:
|
||||
commentjson.dump(jsonObject, fp, indent=2, sort_keys=False)
|
||||
return True
|
||||
except commentjson.JSONLibraryException as e:
|
||||
print('WARN: saveJson '+str(e))
|
||||
except:
|
||||
print('WARN: saveJson')
|
||||
time.sleep(1)
|
||||
tries+=1
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user