mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix error for modules where __file__ is None
This commit is contained in:
parent
ac3ba58e55
commit
808ca386c4
@ -1116,7 +1116,8 @@ class Freezer:
|
||||
filename = '/'.join(dirnames)
|
||||
|
||||
module = self.mf.modules.get(mdef.moduleName, None)
|
||||
if getattr(module, '__path__', None) is not None or getattr(module, '__file__', '').endswith('/__init__.py'):
|
||||
if getattr(module, '__path__', None) is not None or \
|
||||
(getattr(module, '__file__', None) is not None and getattr(module, '__file__').endswith('/__init__.py')):
|
||||
# It's actually a package. In this case, we really write
|
||||
# the file moduleName/__init__.py.
|
||||
filename += '/__init__'
|
||||
|
Loading…
x
Reference in New Issue
Block a user