Commit 1c34660af451c109125dca4db977225f9a851766
1 parent
d773e543
fixed bug: only close vba_parser if it is not None
Showing
1 changed file
with
2 additions
and
1 deletions
oletools/olevba.py
| ... | ... | @@ -2999,7 +2999,8 @@ def main(): |
| 2999 | 2999 | return_code = RETURN_PARSE_ERROR if return_code == 0 \ |
| 3000 | 3000 | else RETURN_SEVERAL_ERRS |
| 3001 | 3001 | finally: |
| 3002 | - vba_parser.close() | |
| 3002 | + if vba_parser is not None: | |
| 3003 | + vba_parser.close() | |
| 3003 | 3004 | |
| 3004 | 3005 | if options.output_mode == 'triage': |
| 3005 | 3006 | print '\n(Flags: OpX=OpenXML, XML=Word2003XML, MHT=MHTML, TXT=Text, M=Macros, ' \ | ... | ... |