Skip to content

Commit

Permalink
dist: fix exception when module has None __path__
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Nov 17, 2019
1 parent 47feac9 commit 92476a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion direct/src/dist/FreezeTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ def __init__(self, previous = None, debugLevel = 0,
# already-imported modules. (Some of them might do their own
# special path mangling.)
for moduleName, module in list(sys.modules.items()):
if module and hasattr(module, '__path__'):
if module and getattr(module, '__path__', None) is not None:
path = list(getattr(module, '__path__'))
if path:
modulefinder.AddPackagePath(moduleName, path[0])
Expand Down

0 comments on commit 92476a3

Please sign in to comment.