Leave partially written to files after export error

This commit is contained in:
apainintheneck 2022-04-30 13:12:13 -07:00
parent d27b95b963
commit 0e0f167891

View file

@ -36,7 +36,6 @@ class TextExporter:
except IOError as e: except IOError as e:
return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]" return f"[{ERROR_COLOR}ERROR{RESET_COLOR}: {e.filename} {e.strerror}]"
except RuntimeError as e: except RuntimeError as e:
os.remove(path)
return e return e
@classmethod @classmethod
@ -58,7 +57,6 @@ class TextExporter:
e.filename, e.strerror, ERROR_COLOR, RESET_COLOR e.filename, e.strerror, ERROR_COLOR, RESET_COLOR
) )
except RuntimeError as e: except RuntimeError as e:
os.remove(full_path)
return e return e
return "[Journal exported to {}]".format(path) return "[Journal exported to {}]".format(path)