-
Notifications
You must be signed in to change notification settings - Fork 4
Suggest to remove file if unsuccessful in extraction #4
Copy link
Copy link
Open
Description
Personally encountered an issue whereby the CSV file (in my case) is saved even though there were unsuccessful extractions.
This led to a lot of confusion when comparing files. I suggest the author add the following changes:
Original:
@staticmethod
def write_string_to_file(content_string, file_path):
f = open(file_path, "w+");
f.write(content_string);
f.close();
return "";
New version:
@staticmethod
def write_string_to_file(content_string, file_path):
try:
f = open(file_path, "w+");
f.write(content_string);
f.close();
except:
os.remove(file_path)
return "";
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels