# HG changeset patch # User Franz Glasner # Date 1739695601 -3600 # Node ID b24080e5ca9671a9ab1150db658df74c35c0bc7f # Parent 57057028f13ee2a0ab4aacb89959f24b2a7fd2cb FIX: Handle OverflowErrlr when comparing CRCs with ints diff -r 57057028f13e -r b24080e5ca96 cutils/util/crc32.py --- a/cutils/util/crc32.py Sun Feb 16 09:46:21 2025 +0100 +++ b/cutils/util/crc32.py Sun Feb 16 09:46:41 2025 +0100 @@ -54,7 +54,10 @@ if isinstance(other, crc32): return self._crc == other._crc elif isinstance(other, INT_TYPES): - return self._get_crc_as_uint32() == self.as_uint32(other) + try: + return self._get_crc_as_uint32() == self.as_uint32(other) + except OverflowError: + return False else: return NotImplemented