From 2b855884a095f81c7e9da4f8728a96d894f7f152 Mon Sep 17 00:00:00 2001 From: Ken Patel Date: Wed, 28 Apr 2010 17:54:22 +0000 Subject: [PATCH] bpdb - fix argument overrides for bpGroup --- direct/src/showbase/PythonUtil.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index ba78c99171..da64677d40 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -4417,10 +4417,11 @@ class BpDb: argsCopy = args[:] def functor(*cArgs, **ckArgs): - ckArgs.update(kArgs) - ckArgs.pop('static', None) - ckArgs['frameCount'] = ckArgs.get('frameCount',1)+1 - return bpdb.bp(*(cArgs), **ckArgs) + kwArgs = kArgs + kwArgs.update(ckArgs) + kwArgs.pop('static', None) + kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 + return bpdb.bp(*(cArgs), **kwArgs) if kArgs.get('static'): return staticmethod(functor) @@ -4438,7 +4439,7 @@ class bp: moduleName = None callingModule = inspect.getmodule(inspect.stack()[frameCount][0]) - if callingModule.__name__ != '__main__': + if callingModule and callingModule.__name__ != '__main__': #get only leaf module name moduleName = callingModule.__name__.split()[-1]