Commit 90792cf8d6b52980fc8a701312bc189d96e0146e
1 parent
011471d9
Specify acceptable errors from ppt parsing
This global except had hidden the problem with failing imports
Showing
1 changed file
with
1 additions
and
1 deletions
oletools/olevba.py
| ... | ... | @@ -2491,7 +2491,7 @@ class VBA_Parser(object): |
| 2491 | 2491 | self.ole_file.close() # just in case |
| 2492 | 2492 | self.ole_file = None # required to make other methods look at ole_subfiles |
| 2493 | 2493 | self.type = TYPE_PPT |
| 2494 | - except Exception as exc: | |
| 2494 | + except (ppt_parser.PptUnexpectedData, ValueError) as exc: | |
| 2495 | 2495 | if self.container == 'PptParser': |
| 2496 | 2496 | # this is a subfile of a ppt --> to be expected that is no ppt |
| 2497 | 2497 | log.debug('PPT subfile is not a PPT file') | ... | ... |