mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
better exception wrapping for __dev__ builtin in report()
This commit is contained in:
parent
c5c375aadf
commit
804d0dde03
@ -2492,9 +2492,15 @@ class ClassTree:
|
||||
|
||||
|
||||
def report(types = [], notifyFunc = None, dConfigParam = []):
|
||||
try:
|
||||
def decorator(f):
|
||||
__dev__
|
||||
return f
|
||||
try:
|
||||
if not __dev__:
|
||||
return decorator
|
||||
except NameError,e:
|
||||
return decorator
|
||||
|
||||
def decorator(f):
|
||||
def wrap(*args,**kwargs):
|
||||
aargs = args
|
||||
kkwargs = kwargs
|
||||
@ -2548,11 +2554,6 @@ def report(types = [], notifyFunc = None, dConfigParam = []):
|
||||
wrap.func_dict = f.func_dict
|
||||
wrap.func_doc = f.func_doc
|
||||
return wrap
|
||||
except NameError,e:
|
||||
print e
|
||||
print 'Error decorating %s in %s with @report' % (f.func_name, f.__module__)
|
||||
def decorator(f):
|
||||
return f
|
||||
|
||||
return decorator
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user