1
0
mirror of synced 2024-11-21 16:54:23 +01:00

Support python3.5

This commit is contained in:
jvoisin 2018-03-31 15:57:14 +02:00
parent 4da974edaf
commit 8bd083ce51

View File

@ -30,8 +30,8 @@ class OfficeParser(abstract.AbstractParser):
temp_folder = tempfile.mkdtemp() temp_folder = tempfile.mkdtemp()
for item in zin.infolist(): for item in zin.infolist():
if item.is_dir(): if item.filename[-1] == '/':
continue continue # `is_dir` is added in Python3.6
elif item.filename.startswith('docProps/'): elif item.filename.startswith('docProps/'):
if not item.filename.endswith('.rels'): if not item.filename.endswith('.rels'):
continue # don't keep metadata files continue # don't keep metadata files