From 85de2b40df6a73b22dd20b1602bc59ec5534ae18 Mon Sep 17 00:00:00 2001 From: Jason Yeung Date: Thu, 15 Jun 2006 01:14:03 +0000 Subject: [PATCH] Finder now looks for an exact match of the module that originally defined the class, by name --- direct/src/showbase/Finder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/Finder.py b/direct/src/showbase/Finder.py index 2f228ab981..3bcce74d7d 100644 --- a/direct/src/showbase/Finder.py +++ b/direct/src/showbase/Finder.py @@ -16,7 +16,11 @@ def findClassInModule(module, className, visited): classObj = module.__dict__.get(className) if classObj and ((type(classObj) == types.ClassType) or (type(classObj) == types.TypeType)): - return [classObj, module.__dict__] + if classObj.__module__ == module.__name__: + return [classObj, module.__dict__] + else: + # print "Must have found a module that imported this class", classObj, module + pass # Now filter out all the modules and iterate through them moduleList = filter(lambda value: type(value) == types.ModuleType, module.__dict__.values())