From 27e79ad6db5143eb8e34a038bd5b8e4f4c4b7c3e Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Tue, 27 Mar 2001 17:32:56 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/distributed/ClientRepository.py | 3 --- direct/src/showbase/Finder.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index bbea93222d..5d4e63a525 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -324,6 +324,3 @@ class ClientRepository(DirectObject.DirectObject): cdu.func = newMethod foundIt = 1 return foundIt - - - diff --git a/direct/src/showbase/Finder.py b/direct/src/showbase/Finder.py index a27082e1fc..d5b34434f4 100644 --- a/direct/src/showbase/Finder.py +++ b/direct/src/showbase/Finder.py @@ -66,7 +66,7 @@ def rebindClass(builtins, filename): parenLoc = classHeader.find('(') if parenLoc > 0: className = classHeader[:parenLoc] - # print 'found className: ' + className + print 'Rebinding class name: ' + className found = 1 foundLine = i foundChar = parenLoc @@ -156,6 +156,12 @@ def replaceStateFunc(oldFunc, newFunc): print ('replaced state exit function: ' + newFunc.__name__) def replaceTcrFunc(oldFunc, newFunc): - res = toonbase.tcr.replaceMethod(oldFunc, newFunc) + try: + res = toonbase.tcr.replaceMethod(oldFunc, newFunc) + except: + try: + res = simbase.air.replaceMethod(oldFunc, newFunc) + except: + res = None if res: print ('replaced DistributedObject function: ' + newFunc.__name__)