From 4896c93827ac06887304d002fbbe977cdcd31efb Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 31 Oct 2011 15:13:50 +0000 Subject: [PATCH] don't error if a module doesn't define __path__ --- direct/src/showutil/FreezeTool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/showutil/FreezeTool.py b/direct/src/showutil/FreezeTool.py index 5abe95b6dd..d8f6239db9 100644 --- a/direct/src/showutil/FreezeTool.py +++ b/direct/src/showutil/FreezeTool.py @@ -660,7 +660,8 @@ class Freezer: if module != None: for symbol in moduleName.split('.')[1:]: module = getattr(module, symbol) - return module.__path__ + if hasattr(module, '__path__'): + return module.__path__ # If it didn't work--maybe the module is unimportable because # it makes certain assumptions about the builtins, or