[Neo-report] r1981 gregory - /trunk/neo/util.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 30 13:11:27 CEST 2010


Author: gregory
Date: Tue Mar 30 13:11:27 2010
New Revision: 1981

Log:
Assert only if instances match.

Modified:
    trunk/neo/util.py

Modified: trunk/neo/util.py
==============================================================================
--- trunk/neo/util.py [iso-8859-1] (original)
+++ trunk/neo/util.py [iso-8859-1] Tue Mar 30 13:11:27 2010
@@ -115,7 +115,8 @@
             if other is None:
                 return False
             assert isinstance(other, (Enum.Item, int, float, long))
-            assert self._enum == other._enum
+            if isinstance(other, Enum):
+                assert self._enum == other._enum
             return int(self) == int(other)
 
     def __init__(self):





More information about the Neo-report mailing list