mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Properly catch ImportError
This commit is contained in:
parent
4896c93827
commit
8ca42e3964
@ -675,7 +675,10 @@ class Freezer:
|
|||||||
if path == None:
|
if path == None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
file, pathname, description = imp.find_module(baseName, path)
|
file, pathname, description = imp.find_module(baseName, path)
|
||||||
|
except ImportError:
|
||||||
|
return None
|
||||||
|
|
||||||
if not os.path.isdir(pathname):
|
if not os.path.isdir(pathname):
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user