diff --git a/API/Classes/Base/FileClass.py b/API/Classes/Base/FileClass.py index a4f07c8c4..3a75631fd 100644 --- a/API/Classes/Base/FileClass.py +++ b/API/Classes/Base/FileClass.py @@ -21,7 +21,7 @@ def writeFile(data, path): with open(path, mode="w") as f: f.write(json.dumps(data, ensure_ascii=True, indent=4, sort_keys=False)) except (IOError, IndexError): - raise IndexError + raise except OSError: raise OSError @@ -31,7 +31,7 @@ def writeFileUJson(data, path): with open(path, mode="w") as f: f.write(json.dumps(data)) except (IOError, IndexError): - raise IndexError + raise except OSError: raise OSError