diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-08 01:39:38 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-08 01:39:38 (GMT) |
commit | 8130f7c3c4a5fa8458bd1dd7ee40229ee687952e (patch) | |
tree | 58441a112aa3b12b7712a90e95b83d37805e3dc0 /Lib | |
parent | 10dfc1ee31bfcbd6158c8d9a79a85c21d0f2561e (diff) | |
download | cpython-8130f7c3c4a5fa8458bd1dd7ee40229ee687952e.zip cpython-8130f7c3c4a5fa8458bd1dd7ee40229ee687952e.tar.gz cpython-8130f7c3c4a5fa8458bd1dd7ee40229ee687952e.tar.bz2 |
Fixed the negative value check in io._BytesIO.seek().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -831,9 +831,9 @@ class _BytesIO(BufferedIOBase): except AttributeError as err: raise TypeError("an integer is required") from err if whence == 0: - self._pos = max(0, pos) if pos < 0: raise ValueError("negative seek position %r" % (pos,)) + self._pos = max(0, pos) elif whence == 1: self._pos = max(0, self._pos + pos) elif whence == 2: |