mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
changed way report uses notify
This commit is contained in:
parent
20d597bad2
commit
ade5993d76
@ -2393,10 +2393,12 @@ class ClassTree:
|
|||||||
return self._getStr()
|
return self._getStr()
|
||||||
|
|
||||||
|
|
||||||
def report(types = [],notifyName = None,notifyLevel = 'fatal'):
|
def report(types = [],notifyFunc = None):
|
||||||
if __dev__:
|
if __dev__:
|
||||||
def decorator(f):
|
def decorator(f):
|
||||||
def wrap(*args,**kwargs):
|
def wrap(*args,**kwargs):
|
||||||
|
aargs = args
|
||||||
|
kkwargs = kwargs
|
||||||
rArgs = [`x`+', ' for x in args] + [ x + ' = ' + '%s, ' % `y` for x,y in kwargs.items()]
|
rArgs = [`x`+', ' for x in args] + [ x + ' = ' + '%s, ' % `y` for x,y in kwargs.items()]
|
||||||
|
|
||||||
if not rArgs:
|
if not rArgs:
|
||||||
@ -2409,8 +2411,8 @@ def report(types = [],notifyName = None,notifyLevel = 'fatal'):
|
|||||||
if 'frameCount' in types:
|
if 'frameCount' in types:
|
||||||
outStr = `globalClock.getFrameCount()` + ': ' + outStr
|
outStr = `globalClock.getFrameCount()` + ': ' + outStr
|
||||||
|
|
||||||
if args and notifyName:
|
if notifyFunc:
|
||||||
eval('args[0].%s.%s(\'%s\')'%(notifyName,notifyLevel,outStr))
|
notifyFunc(outStr)
|
||||||
else:
|
else:
|
||||||
print outStr
|
print outStr
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user