[Checkins] SVN: zope.app.undo/branches/nikhil_n-py25/src/zope/app/undo/__init__.py made zope.app.undo work with Python 2.5

nikhil n nikhil.n.n at gmail.com
Sat Jul 7 08:13:15 EDT 2007


Log message for revision 77570:
  made zope.app.undo work with Python 2.5

Changed:
  U   zope.app.undo/branches/nikhil_n-py25/src/zope/app/undo/__init__.py

-=-
Modified: zope.app.undo/branches/nikhil_n-py25/src/zope/app/undo/__init__.py
===================================================================
--- zope.app.undo/branches/nikhil_n-py25/src/zope/app/undo/__init__.py	2007-07-07 12:02:04 UTC (rev 77569)
+++ zope.app.undo/branches/nikhil_n-py25/src/zope/app/undo/__init__.py	2007-07-07 12:13:15 UTC (rev 77570)
@@ -83,9 +83,14 @@
     False
     """
     def __eq__(self, other):
-        if other and unicode(other[:len(self)]).__eq__(self) == 1:
-            return True
-        return False
+        try:
+            if other and unicode(other[:len(self)]).__cmp__(self) == 1:
+                return True
+            return False
+        except AttributeError:
+            if other and unicode(other[:len(self)]).__eq__(self) == 1:
+                return True
+            return False
 
     def __ne__(self, other):
         return not self.__eq__(other)



More information about the Checkins mailing list