diff --git a/oletools/ppt_record_parser.py b/oletools/ppt_record_parser.py index acdc0dd..9deb4c9 100644 --- a/oletools/ppt_record_parser.py +++ b/oletools/ppt_record_parser.py @@ -63,7 +63,7 @@ except ImportError: sys.path.insert(0, PARENT_DIR) del PARENT_DIR from oletools import record_base -from oletools.common.errors import FileIsEncryptedError +from oletools.common.errors import CryptoErrorBase # types of relevant records (there are much more than listed here) @@ -181,11 +181,8 @@ def is_ppt(filename): return True else: # ignore other streams/storages since they are optional continue - except FileIsEncryptedError: - assert ppt_file is not None, \ - 'Encryption error should not be raised from just opening OLE file.' - # just rely on stream names, copied from oleid - return ppt_file.exists('PowerPoint Document') + except CryptoErrorBase: + raise except Exception: pass return False