[Zope3-checkins] CVS: Zope3/src/zodb/code - patch.py:1.13

Jim Fulton jim@zope.com
Thu, 26 Jun 2003 18:42:29 -0400


Update of /cvs-repository/Zope3/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv31331/src/zodb/code

Modified Files:
	patch.py 
Log Message:
Fixed a bug in handling pickling of module references in persistent modules.


=== Zope3/src/zodb/code/patch.py 1.12 => 1.13 ===
--- Zope3/src/zodb/code/patch.py:1.12	Wed May  7 14:37:53 2003
+++ Zope3/src/zodb/code/patch.py	Thu Jun 26 18:41:58 2003
@@ -195,7 +195,10 @@
         return wrapperclass(obj, self._module, self._repl.get(id(obj)))
 
     def persistent_id(self, obj, force=False):
-        if isinstance(obj, Wrapper) or obj is self._builtins or force:
+        if (isinstance(obj, Wrapper)
+            or isinstance(obj, ModuleType)
+            or obj is self._builtins
+            or force):
             oid = id(obj)
             self._pmemo[oid] = obj
             return oid