Skip to content

Commit

Permalink
Merge pull request #48 from bmihelac/add-bitfield-__cmp__
Browse files Browse the repository at this point in the history
FIX: BitHandler.__cmp__ on 32bit systems
  • Loading branch information
dcramer committed Sep 25, 2014
2 parents 58ddff4 + 638bc55 commit 58b215a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitfield/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __eq__(self, other):
return self._value == other._value

def __cmp__(self, other):
return self._value.__cmp__(int(other))
return cmp(self._value, other)

def __repr__(self):
return '<%s: %s>' % (self.__class__.__name__, ', '.join('%s=%s' % (k, self.get_bit(n).is_set) for n, k in enumerate(self._keys)),)
Expand Down

0 comments on commit 58b215a

Please sign in to comment.