summaryrefslogtreecommitdiff
path: root/libmat2
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor2018-09-04 16:15:39 -0400
committerDaniel Kahn Gillmor2018-09-04 18:28:04 -0400
commit1d7e374e5b0c6a84b3319d9d1e7c6f5c222af878 (patch)
treec78298641f83a003d327803dda0aab798e48bef0 /libmat2
parent915dc634c4fd51e4dda5697cf8fd150cef9d1f3a (diff)
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.
Diffstat (limited to 'libmat2')
-rw-r--r--libmat2/office.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmat2/office.py b/libmat2/office.py
index e48773a..e79fe58 100644
--- a/libmat2/office.py
+++ b/libmat2/office.py
@@ -98,11 +98,10 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
98 full_path = os.path.join(temp_folder, item.filename) 98 full_path = os.path.join(temp_folder, item.filename)
99 99
100 if self._specific_cleanup(full_path) is False: 100 if self._specific_cleanup(full_path) is False:
101 shutil.rmtree(temp_folder)
102 os.remove(self.output_filename)
103 logging.warning("Something went wrong during deep cleaning of %s", 101 logging.warning("Something went wrong during deep cleaning of %s",
104 item.filename) 102 item.filename)
105 return False 103 abort = True
104 continue
106 105
107 if item.filename in self.files_to_keep: 106 if item.filename in self.files_to_keep:
108 # those files aren't supported, but we want to add them anyway 107 # those files aren't supported, but we want to add them anyway