Pass the class itself to the registrar function.

Not part of the build.
This commit is contained in:
markh@activestate.com
2001-04-03 11:17:35 +00:00
parent c535243785
commit 06683b0c3b
2 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ class Module:
# See if this class nominates custom register_self
extra_func = getattr(klass, "_reg_registrar_", (None,None))[0]
if extra_func is not None:
extra_func(compMgr, location, registryLocation, componentType)
extra_func(klass, compMgr, location, registryLocation, componentType)
print "Registered %d Python components in %s" % (len(self.components),os.path.basename(location.path))
def unregisterSelf(self, compMgr, location, registryLocation):
@@ -75,7 +75,7 @@ class Module:
extra_func = getattr(klass, "_reg_registrar_", (None,None))[1]
if extra_func is not None:
try:
extra_func(compMgr, location, registryLocation)
extra_func(klass, compMgr, location, registryLocation)
except Exception:
ok = 0
if ok: