Commit e8dfd169afd1dd75bb53624ee3ebeda1093f4089
1 parent
ea91bcc2
olevba: moved import pcodedmp to avoid circular imports
Showing
1 changed file
with
2 additions
and
1 deletions
oletools/olevba.py
| ... | ... | @@ -286,7 +286,6 @@ except ImportError: |
| 286 | 286 | + "or http://effbot.org/zone/element-index.htm") |
| 287 | 287 | |
| 288 | 288 | import colorclass |
| 289 | -from pcodedmp import pcodedmp | |
| 290 | 289 | |
| 291 | 290 | # On Windows, colorclass needs to be enabled: |
| 292 | 291 | if os.name == 'nt': |
| ... | ... | @@ -3603,6 +3602,8 @@ class VBA_Parser_CLI(VBA_Parser): |
| 3603 | 3602 | log.info('Error parsing form: %s' % exc) |
| 3604 | 3603 | log.debug('Traceback:', exc_info=True) |
| 3605 | 3604 | if pcode: |
| 3605 | + # import pcodedmp here to avoid circular imports: | |
| 3606 | + from pcodedmp import pcodedmp | |
| 3606 | 3607 | print('-' * 79) |
| 3607 | 3608 | print('P-CODE disassembly:') |
| 3608 | 3609 | # pcodedmp prints all its output to sys.stdout, so we need to capture it so that | ... | ... |