Support python3.5
This commit is contained in:
parent
4da974edaf
commit
8bd083ce51
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user