Skip to content

Commit

Permalink
Modulegraph: Reorder hook-dir search pattern. See pyinstaller#4806
Browse files Browse the repository at this point in the history
  • Loading branch information
Legorooj committed Jun 16, 2020
1 parent 8714423 commit 89d7f20
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions PyInstaller/depend/analysis.py
Expand Up @@ -124,10 +124,9 @@ def _reset(self, user_hook_dirs):
"""
self._top_script_node = None
self._additional_files_cache = AdditionalFilesCache()
# Prepend PyInstaller hook dir hook directories from entry points and
# user hook dirs. Thus PyInstaller hook will have lowest priority.q
# Command line, Entry Point, and then builtin hook dirs.
self._user_hook_dirs = (
[os.path.join(PACKAGEPATH, 'hooks')] + list(user_hook_dirs)
list(user_hook_dirs) + [os.path.join(PACKAGEPATH, 'hooks')]
)
# Hook-specific lookup tables.
# These need to reset when reusing cached PyiModuleGraph to avoid
Expand Down Expand Up @@ -296,7 +295,7 @@ def run_script(self, pathname, caller=None):
# Remember the node for the first script.
try:
self._top_script_node = super(PyiModuleGraph, self).run_script(pathname)
except SyntaxError:
except SyntaxError as e:
print("\nSyntax error in", pathname, file=sys.stderr)
formatted_lines = traceback.format_exc().splitlines(True)
print(*formatted_lines[-4:], file=sys.stderr)
Expand Down

0 comments on commit 89d7f20

Please sign in to comment.