[Zodb-checkins] CVS: Zope/lib/python/ZODB - Mount.py:1.15

Shane Hathaway shane@cvs.zope.org
Thu, 23 May 2002 16:53:23 -0400


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv8410

Modified Files:
	Mount.py 
Log Message:
Correctly get ZClasses from the parent of a mounted connection.


=== Zope/lib/python/ZODB/Mount.py 1.14 => 1.15 ===
 def parentClassFactory(jar, module, name):
     # Use the class factory from the parent database.
-    parent_db = getattr(getattr(jar, '_mount_parent_jar', None),
-                        '_db', None)
+    parent_conn = getattr(jar, '_mount_parent_jar', None)
+    parent_db = getattr(parent_conn, '_db', None)
     if parent_db is None:
         _globals = {}
         _silly = ('__doc__',)
         return getattr(__import__(
             module, _globals, _globals, _silly), name)
     else:
-        return parent_db._classFactory(jar, module, name)
+        return parent_db._classFactory(parent_conn, module, name)
 
 
 class MountPoint(Persistence.Persistent, Acquisition.Implicit):