summaryrefslogtreecommitdiffstats
path: root/Lib/io.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/io.py')
-rw-r--r--Lib/io.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/io.py b/Lib/io.py
index c2f5d3e..d9550ae 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -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: