summaryrefslogtreecommitdiff
path: root/libmat2
diff options
context:
space:
mode:
Diffstat (limited to 'libmat2')
-rw-r--r--libmat2/office.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmat2/office.py b/libmat2/office.py
index eae84f7..14621d4 100644
--- a/libmat2/office.py
+++ b/libmat2/office.py
@@ -51,7 +51,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
51 def _specific_cleanup(self, full_path: str) -> bool: 51 def _specific_cleanup(self, full_path: str) -> bool:
52 """ This method can be used to apply specific treatment 52 """ This method can be used to apply specific treatment
53 to files present in the archive.""" 53 to files present in the archive."""
54 return True 54 return True # pragma: no cover
55 55
56 def _clean_zipinfo(self, zipinfo: zipfile.ZipInfo) -> zipfile.ZipInfo: 56 def _clean_zipinfo(self, zipinfo: zipfile.ZipInfo) -> zipfile.ZipInfo:
57 zipinfo.create_system = 3 # Linux 57 zipinfo.create_system = 3 # Linux
@@ -147,9 +147,9 @@ class MSOfficeParser(ArchiveBasedAbstractParser):
147 tree, ns = _parse_xml(full_path) 147 tree, ns = _parse_xml(full_path)
148 148
149 # No revisions are present 149 # No revisions are present
150 if tree.find('.//w:del', ns) is None: 150 del_presence = tree.find('.//w:del', ns)
151 return True 151 ins_presence = tree.find('.//w:ins', ns)
152 elif tree.find('.//w:ins', ns) is None: 152 if del_presence is None and ins_presence is None:
153 return True 153 return True
154 154
155 parent_map = {c:p for p in tree.iter() for c in p} 155 parent_map = {c:p for p in tree.iter() for c in p}