[Zope-Checkins] CVS: Products/TemporaryFolder -
LowConflictConnection.py:1.3.132.1
Tres Seaver
tseaver at palladion.com
Sat May 28 20:42:14 EDT 2005
Update of /cvs-repository/Products/TemporaryFolder
In directory cvs.zope.org:/tmp/cvs-serv32028/lib/python/Products/TemporaryFolder
Modified Files:
Tag: tseaver-hasattr_geddon-branch
LowConflictConnection.py
Log Message:
- Removed all uses of the 'hasattr' builtin from the core, where
the object being tested derives (or might) from Persistent.
XXX: currently, this branch imports a 'safe_hasattr' from ZODB.utils,
which adds a dependency on ZODB for some packages; we probably
need a better location, and perhas a C implementation?
=== Products/TemporaryFolder/LowConflictConnection.py 1.3 => 1.3.132.1 ===
--- Products/TemporaryFolder/LowConflictConnection.py:1.3 Wed Aug 14 18:25:13 2002
+++ Products/TemporaryFolder/LowConflictConnection.py Sat May 28 20:41:34 2005
@@ -13,6 +13,7 @@
from ZODB.Connection import Connection
from ZODB.POSException import ConflictError
+from ZODB.utils import safe_hasattr
from cPickle import Unpickler
from cStringIO import StringIO
@@ -37,7 +38,7 @@
unpickler.persistent_load=self._persistent_load
unpickler.load()
state = unpickler.load()
- if hasattr(object, '__setstate__'):
+ if safe_hasattr(object, '__setstate__'):
object.__setstate__(state)
else:
d=object.__dict__
More information about the Zope-Checkins
mailing list