From 92476a37880a73b98baed6a3a28d2f1867f18889 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 17 Nov 2019 20:36:40 +0100 Subject: [PATCH] dist: fix exception when module has None __path__ --- direct/src/dist/FreezeTool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py index 3b32fcf885..18ecbf109a 100644 --- a/direct/src/dist/FreezeTool.py +++ b/direct/src/dist/FreezeTool.py @@ -785,7 +785,7 @@ class Freezer: # 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])