Don't show libpandaexpress ImportError if importing panda3d.core failed

This commit is contained in:
rdb 2016-04-01 10:38:35 +02:00
parent 2b034506fa
commit 461b231a2e

View File

@ -111,9 +111,14 @@ def Dtool_PreloadDLL(module):
# new-style build, and if it fails we must be in an old-style build. # new-style build, and if it fails we must be in an old-style build.
try: try:
from panda3d.core import * from panda3d.core import *
except ImportError: except ImportError as ex:
Dtool_PreloadDLL("libpandaexpress") # Maybe we're using an old-style libpandaexpress module?
from libpandaexpress import * try:
Dtool_PreloadDLL("libpandaexpress")
from libpandaexpress import *
except ImportError:
# Nope. Re-raise the original ImportError.
raise ex
def Dtool_ObjectToDict(cls, name, obj): def Dtool_ObjectToDict(cls, name, obj):
cls.DtoolClassDict[name] = obj; cls.DtoolClassDict[name] = obj;