Commit af54fab4f365f97d9710a7ca09ba4febabbabd94

Authored by Philippe Lagadec
Committed by GitHub
2 parents 734446fb d51d31c1

Merge pull request #392 from GoSecure/oleid-import-fix

Fixing PrettyTable import for oleid (fixes #391)
Showing 1 changed file with 2 additions and 2 deletions
oletools/oleid.py
@@ -86,13 +86,13 @@ from os.path import dirname, abspath @@ -86,13 +86,13 @@ from os.path import dirname, abspath
86 # little hack to allow absolute imports even if oletools is not installed 86 # little hack to allow absolute imports even if oletools is not installed
87 # (required to run oletools directly as scripts in any directory). 87 # (required to run oletools directly as scripts in any directory).
88 try: 88 try:
89 - from oletools.thirdparty import prettytable 89 + from oletools.thirdparty.prettytable import prettytable
90 except ImportError: 90 except ImportError:
91 PARENT_DIR = dirname(dirname(abspath(__file__))) 91 PARENT_DIR = dirname(dirname(abspath(__file__)))
92 if PARENT_DIR not in sys.path: 92 if PARENT_DIR not in sys.path:
93 sys.path.insert(0, PARENT_DIR) 93 sys.path.insert(0, PARENT_DIR)
94 del PARENT_DIR 94 del PARENT_DIR
95 - from oletools.thirdparty import prettytable 95 + from oletools.thirdparty.prettytable import prettytable
96 96
97 import olefile 97 import olefile
98 98