savejson error handling

main2
Bob Mottram 2019-10-26 14:31:42 +01:00
parent e7f377698a
commit a65b8bf644
1 changed files with 2 additions and 2 deletions

View File

@ -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