From d39c090557f114df4f70ef10a1e739544d2593cb Mon Sep 17 00:00:00 2001 From: Jason Yeung Date: Thu, 29 Sep 2005 23:10:10 +0000 Subject: [PATCH] (Darren): better error detection --- direct/src/distributed/ConnectionRepository.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index d16ade3a99..60f8f3ea57 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -88,13 +88,12 @@ class ConnectionRepository( value = unpacker.unpackObject() unpacker.endUnpack() if value is not None: - try: - function = getattr(distObj, field.getName()) + function = getattr(distObj, field.getName()) + if function is not None: function(*value) - except AttributeError: + else: self.notify.error("\n\n\nNot able to find %s.%s"%( distObj.__class__.__name__, field.getName())) - pass # Look up the dclass dclass = self.dclassesByName.get(dcname+self.dcSuffix)