[Zodb-checkins] CVS: Zope/lib/python/ZODB - ConflictResolution.py:1.6

Chris McDonough chrism@zope.com
Wed, 3 Oct 2001 15:57:23 -0400


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

Modified Files:
	ConflictResolution.py 
Log Message:
Changed the conflict resolution machinery to avoid attempting to resolve conflicts on ZClasses, because we can't import their "modules" (we don't have a db connection).



=== Zope/lib/python/ZODB/ConflictResolution.py 1.5 => 1.6 ===
 
 bad_classes={}
-bad_class=bad_classes.has_key
+def bad_class(class_tuple):
+    if bad_classes.has_key(class_tuple) or class_tuple[0][1] == '*':
+        # if we've seen the class before or if it's a ZClass, we know that
+        # we can't resolve the conflict
+        return 1
 
 ResolvedSerial='rs'