From f54565390da61a6daac9db070d1f03ce3c062935 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 19 May 2004 17:45:33 +0000 Subject: [PATCH] import mangled name too --- direct/src/distributed/ConnectionRepository.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index b11e28ccc7..170282de72 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -96,10 +96,18 @@ class ConnectionRepository(DirectObject.DirectObject): # Get all symbols. dcImports.update(module.__dict__) else: - if not hasattr(module, symbolName): + mangledName = self.mangleName(symbolName) + gotAny = 0 + if hasattr(module, symbolName): + dcImports[symbolName] = getattr(module, symbolName) + gotAny = 1 + if hasattr(module, mangledName): + dcImports[mangledName] = getattr(module, mangledName) + gotAny = 1 + + if not gotAny: self.notify.error("Symbol %s not found in module %s." % ( symbolName, moduleName)) - dcImports[symbolName] = getattr(module, symbolName) else: # "import moduleName" # Copy the module itself into the dictionary.