diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-08 18:04:45 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-08 18:04:45 (GMT) |
commit | 8e42a0a0e0358c2004c33e0c7415ca48874df991 (patch) | |
tree | 79d6df5b01ae1da021d2776d085186742dfd774a /Lib/io.py | |
parent | 8bd14fb398b1b89c82defdac6c5755c9ca86859b (diff) | |
download | cpython-8e42a0a0e0358c2004c33e0c7415ca48874df991.zip cpython-8e42a0a0e0358c2004c33e0c7415ca48874df991.tar.gz cpython-8e42a0a0e0358c2004c33e0c7415ca48874df991.tar.bz2 |
Fixed bug #1081: file.seek allows float arguments
Diffstat (limited to 'Lib/io.py')
-rw-r--r-- | Lib/io.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -694,6 +694,8 @@ class BytesIO(BufferedIOBase): return n def seek(self, pos, whence=0): + if not isinstance(pos, int): + raise TypeError("an integer is required") if whence == 0: self._pos = max(0, pos) elif whence == 1: |