summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmat2/office.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/libmat2/office.py b/libmat2/office.py
index f77c0f5..d7eca11 100644
--- a/libmat2/office.py
+++ b/libmat2/office.py
@@ -179,7 +179,7 @@ class MSOfficeParser(ZipParser):
179 return False 179 return False
180 180
181 # rsid, tags or attributes, are always under the `w` namespace 181 # rsid, tags or attributes, are always under the `w` namespace
182 if 'w' not in namespace.keys(): 182 if 'w' not in namespace:
183 return True 183 return True
184 184
185 parent_map = {c:p for p in tree.iter() for c in p} 185 parent_map = {c:p for p in tree.iter() for c in p}
@@ -215,7 +215,7 @@ class MSOfficeParser(ZipParser):
215 return False 215 return False
216 216
217 # The nsid tag is always under the `w` namespace 217 # The nsid tag is always under the `w` namespace
218 if 'w' not in namespace.keys(): 218 if 'w' not in namespace:
219 return True 219 return True
220 220
221 parent_map = {c:p for p in tree.iter() for c in p} 221 parent_map = {c:p for p in tree.iter() for c in p}
@@ -328,7 +328,7 @@ class MSOfficeParser(ZipParser):
328 logging.error("Unable to parse %s: %s", full_path, e) 328 logging.error("Unable to parse %s: %s", full_path, e)
329 return False 329 return False
330 330
331 if 'p14' not in namespace.keys(): 331 if 'p14' not in namespace:
332 return True # pragma: no cover 332 return True # pragma: no cover
333 333
334 for item in tree.iterfind('.//p14:creationId', namespace): 334 for item in tree.iterfind('.//p14:creationId', namespace):
@@ -344,7 +344,7 @@ class MSOfficeParser(ZipParser):
344 logging.error("Unable to parse %s: %s", full_path, e) 344 logging.error("Unable to parse %s: %s", full_path, e)
345 return False 345 return False
346 346
347 if 'p' not in namespace.keys(): 347 if 'p' not in namespace:
348 return True # pragma: no cover 348 return True # pragma: no cover
349 349
350 for item in tree.iterfind('.//p:sldMasterId', namespace): 350 for item in tree.iterfind('.//p:sldMasterId', namespace):
@@ -486,7 +486,7 @@ class LibreOfficeParser(ZipParser):
486 logging.error("Unable to parse %s: %s", full_path, e) 486 logging.error("Unable to parse %s: %s", full_path, e)
487 return False 487 return False
488 488
489 if 'office' not in namespace.keys(): # no revisions in the current file 489 if 'office' not in namespace: # no revisions in the current file
490 return True 490 return True
491 491
492 for text in tree.getroot().iterfind('.//office:text', namespace): 492 for text in tree.getroot().iterfind('.//office:text', namespace):