Commit d5413fbc authored by Vincent Pelletier's avatar Vincent Pelletier

'other' might not be an int.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1163 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9c35ba71
...@@ -34,7 +34,7 @@ class EnumItem(int): ...@@ -34,7 +34,7 @@ class EnumItem(int):
Raise if compared type doesn't match. Raise if compared type doesn't match.
""" """
if not isinstance(other, EnumItem): if not isinstance(other, EnumItem):
raise TypeError, 'Comparing an enum with an int.' raise TypeError, 'Comparing an enum with %r.' % (other, )
if other.enum is not self.enum: if other.enum is not self.enum:
raise TypeError, 'Comparing enums of incompatible types: %s ' \ raise TypeError, 'Comparing enums of incompatible types: %s ' \
'and %s' % (self, other) 'and %s' % (self, other)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment