1
0
mirror of synced 2024-11-22 09:14:23 +01:00

office: try all members, even when one fails

the end result will be the same -- an abort -- but the user will get
to see all the warnings for a particular file, instead of getting them
one at a time.
This commit is contained in:
Daniel Kahn Gillmor 2018-09-04 16:15:39 -04:00
parent 915dc634c4
commit 1d7e374e5b

View File

@ -98,11 +98,10 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
full_path = os.path.join(temp_folder, item.filename) full_path = os.path.join(temp_folder, item.filename)
if self._specific_cleanup(full_path) is False: if self._specific_cleanup(full_path) is False:
shutil.rmtree(temp_folder)
os.remove(self.output_filename)
logging.warning("Something went wrong during deep cleaning of %s", logging.warning("Something went wrong during deep cleaning of %s",
item.filename) item.filename)
return False abort = True
continue
if item.filename in self.files_to_keep: if item.filename in self.files_to_keep:
# those files aren't supported, but we want to add them anyway # those files aren't supported, but we want to add them anyway