[Zodb-checkins] CVS: Zope3/lib/python/ZODB - ConflictResolution.py:1.7.30.2

Jeremy Hylton jeremy@zope.com
Tue, 5 Mar 2002 00:13:15 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	ConflictResolution.py 
Log Message:
Remove unused import.

Remove unused kwargs to PersistentReferenceFactory.__call__().


=== Zope3/lib/python/ZODB/ConflictResolution.py 1.7.30.1 => 1.7.30.2 ===
 from cStringIO import StringIO
 from cPickle import Unpickler, Pickler
-import sys
 
 from ZODB.POSException import ConflictError
 
 __new__=object.__new__
 
-#import traceback
-
 bad_classes={}
 def bad_class(class_tuple):
     if bad_classes.has_key(class_tuple) or class_tuple[0][0] == '*':
@@ -126,19 +123,18 @@
 
 class PersistentReferenceFactory:
 
-    data=None
+    data = None
     
-    def __call__(self, oid,
-                 getattr=getattr, None=None):
-
-        data=self.data
-        if not data: data=self.data={}
+    def __call__(self, oid):
+        data = self.data
+        if not data:
+            data = self.data = {}
 
-        r=data.get(oid, None)
+        r = data.get(oid, None)
         if r is None:
-            r=PersistentReference()
-            r.data=oid
-            data[oid]=r
+            r = PersistentReference()
+            r.data = oid
+            data[oid] = r
 
         return r