Skip to content

Commit 03c1051

Browse files
committed
TransRead.read: pass on -1 instead of 0xFFFFFFFFFFFFFFFF
Passing 0xFFFFFFFFFFFFFFFF to read causes python to complain about: OverflowError: cannot fit 'int' into an index-sized integer
1 parent 7ca37b1 commit 03c1051

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bmaptools/TransRead.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,12 +664,10 @@ def _print_warning(timeout):
664664

665665
def read(self, size=-1):
666666
"""
667-
Read the data from the file or URL and and uncompress it on-the-fly if
667+
Read the data from the file or URL and uncompress it on-the-fly if
668668
necessary.
669669
"""
670670

671-
if size < 0:
672-
size = 0xFFFFFFFFFFFFFFFF
673671
buf = self._f_objs[-1].read(size)
674672
self._pos += len(buf)
675673

0 commit comments

Comments
 (0)