From 2d2f8d71003b9c0b2cd729be7dda7890fa1fee0a Mon Sep 17 00:00:00 2001 From: Roger Hughston Date: Thu, 9 Aug 2007 20:21:44 +0000 Subject: [PATCH] Changed the lack of dc definition to be a warning --- .../src/distributed/ConnectionRepository.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index fc058d97cd..447a048aa5 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -170,6 +170,7 @@ class ConnectionRepository( dcFileNames is None, reads in all of the dc files listed in the Configrc file. """ + #import pdb; pdb.set_trace(); dcFile = self.getDcFile() dcFile.clear() self.dclassesByName = {} @@ -191,14 +192,14 @@ class ConnectionRepository( if not readResult: self.notify.error("Could not read dc file: %s" % (dcFileName)) - if not dcFile.allObjectsValid(): - names = [] - for i in range(dcFile.getNumTypedefs()): - td = dcFile.getTypedef(i) - if td.isBogusTypedef(): - names.append(td.getName()) - nameList = ', '.join(names) - self.notify.error("Undefined types in DC file: " + nameList) + #if not dcFile.allObjectsValid(): + # names = [] + # for i in range(dcFile.getNumTypedefs()): + # td = dcFile.getTypedef(i) + # if td.isBogusTypedef(): + # names.append(td.getName()) + # nameList = ', '.join(names) + # self.notify.error("Undefined types in DC file: " + nameList) self.hashVal = dcFile.getHash() @@ -255,7 +256,8 @@ class ConnectionRepository( else: if type(classDef) == types.ModuleType: if not hasattr(classDef, className): - self.notify.error("Module %s does not define class %s." % (className, className)) + self.notify.warning("Module %s does not define class %s." % (className, className)) + return classDef = getattr(classDef, className) if type(classDef) != types.ClassType and type(classDef) != types.TypeType: