mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-20 05:54:54 -04:00
don't report error messages for panda3d.blah
This commit is contained in:
parent
dd71475227
commit
727b2ca5a9
@ -18,6 +18,7 @@ except ImportError:
|
|||||||
import direct
|
import direct
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from pandac.extension_native_helpers import dll_suffix, dll_ext
|
from pandac.extension_native_helpers import dll_suffix, dll_ext
|
||||||
|
import panda3d
|
||||||
|
|
||||||
# Check to see if we are running python_d, which implies we have a
|
# Check to see if we are running python_d, which implies we have a
|
||||||
# debug build, and we have to build the module with debug options.
|
# debug build, and we have to build the module with debug options.
|
||||||
@ -1312,6 +1313,22 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
|||||||
finding the libpandaexpress etc. modules that interrogate
|
finding the libpandaexpress etc. modules that interrogate
|
||||||
produces. """
|
produces. """
|
||||||
|
|
||||||
|
def __init__(self, *args, **kw):
|
||||||
|
modulefinder.ModuleFinder.__init__(self, *args, **kw)
|
||||||
|
|
||||||
|
def import_module(self, partname, fqname, parent):
|
||||||
|
if parent and parent.__name__ == 'panda3d':
|
||||||
|
# A special case: map a reference to the "panda3d.blah"
|
||||||
|
# module into the appropriate Panda3D dll.
|
||||||
|
m = getattr(panda3d, partname, None)
|
||||||
|
if m:
|
||||||
|
libname = m.__libraries__[-1]
|
||||||
|
partname = libname
|
||||||
|
fqname = libname
|
||||||
|
parent = None
|
||||||
|
|
||||||
|
return modulefinder.ModuleFinder.import_module(self, partname, fqname, parent)
|
||||||
|
|
||||||
def find_module(self, name, path, parent=None):
|
def find_module(self, name, path, parent=None):
|
||||||
try:
|
try:
|
||||||
return modulefinder.ModuleFinder.find_module(self, name, path, parent = parent)
|
return modulefinder.ModuleFinder.find_module(self, name, path, parent = parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user