[Zope-Checkins] CVS: Zope/lib/python/ZODB - Connection.py:1.131

Jeremy Hylton jeremy at zope.com
Mon Mar 1 14:07:26 EST 2004

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

Modified Files:
Log Message:
Only generated the warning if the oid is None.

If there is a jar and no oid, then the user assigned _p_jar directly.
All the Connection that assigns _p_jar also assigns an oid.

=== Zope/lib/python/ZODB/Connection.py 1.130 => 1.131 ===
--- Zope/lib/python/ZODB/Connection.py:1.130	Fri Feb 27 11:12:35 2004
+++ Zope/lib/python/ZODB/Connection.py	Mon Mar  1 14:07:25 2004
@@ -634,7 +634,7 @@
         policy of one transaction manager for each thread.
         assert obj._p_jar is self
-        if obj._p_oid is not None:
+        if obj._p_oid is None:
             # There is some old Zope code that assigns _p_jar
             # directly.  That is no longer allowed, but we need to
             # provide support for old code that still does it.

More information about the Zope-Checkins mailing list