瀏覽代碼

*** empty log message ***

Joe Shochet 25 年之前
父節點
當前提交
0ba3ac85cb

+ 3 - 1
direct/src/distributed/ClientDistUpdate.py

@@ -19,7 +19,9 @@ class ClientDistUpdate:
         exec("import " + cdc.name)
         try:
             self.func = eval(cdc.name + "." + cdc.name + "." + self.name)
-        except:
+        # Only catch name and attribute errors
+        # as all other errors are legit errors
+        except (NameError, AttributeError), e:
             ClientDistUpdate.notify.warning(cdc.name + "." + self.name +
                                             " does not exist")
             self.func = None

+ 5 - 2
direct/src/distributed/ClientRepository.py

@@ -173,12 +173,15 @@ class ClientRepository(DirectObject.DirectObject):
             distObj = cdc.constructor(self)
             # Assign it an Id
             distObj.doId = doId
+            # Put the new do in both dictionaries
+            self.doId2do[doId] = distObj
+            self.doId2cdc[doId] = cdc
             # Update the required fields
 	    distObj.generate()
             distObj.updateRequiredOtherFields(cdc, di)
             # Put the new do in both dictionaries
-            self.doId2do[doId] = distObj
-            self.doId2cdc[doId] = cdc
+            # self.doId2do[doId] = distObj
+            # self.doId2cdc[doId] = cdc
             
         return distObj
 

+ 0 - 1
direct/src/distributed/DistributedObject.py

@@ -1,7 +1,6 @@
 """DistributedObject module: contains the DistributedObject class"""
 
 from PandaObject import *
-#from ToonBaseGlobal import *
 
 class DistributedObject(PandaObject):
     """Distributed Object class:"""

+ 0 - 8
direct/src/ffi/FFISpecs.py

@@ -265,14 +265,6 @@ class MethodSpecification(FunctionSpecification):
         self.outputInheritedMethodBody(methodClass, parentList, file, nesting, needsDowncast)
         self.outputInheritedMethodFooter(methodClass, parentList, file, nesting, needsDowncast)
         
-    def generateDowncastMethodCode(self, methodClass, file, nesting):
-        # The downcast method code is just like regular code, but the
-        # return value wrapper does not have downcasting instructions in
-        # it to prevent an infinite loop of downcasting
-        self.outputMethodHeader(methodClass, file, nesting)
-        self.outputMethodBody(methodClass, file, nesting, 0) # no downcast
-        self.outputMethodFooter(methodClass, file, nesting)
-
     def generateUpcastMethodCode(self, methodClass, file, nesting):
         # The upcast method code is just like regular code, but the
         # return value wrapper does not have downcasting instructions

+ 5 - 3
direct/src/fsm/FSM.py

@@ -7,7 +7,7 @@ class FSM(DirectObject):
 
     # create FSM DirectNotify category
     notify = directNotify.newCategory("FSM")
-    #notify.setDebug(1)
+    notify.setDebug(1)
 
     # special methods
     
@@ -152,8 +152,10 @@ class FSM(DirectObject):
                               exitArgList)
             return 1
         else:
-            FSM.notify.debug("[%s]: no transition exists to %s" %
-                             (self.__name, aStateName))
+            FSM.notify.warning("[%s]: no transition exists from %s to %s" %
+                               (self.__name,
+                                self.__currentState.getName(),
+                                aStateName))
             return 0