Implement the suggestion of bug_id=122070: surround tell() call with

try/except.
This commit is contained in:
Guido van Rossum 2000-11-09 18:05:24 +00:00
parent 17bfef5860
commit a66eed62fd

View file

@ -132,7 +132,11 @@ class Message:
tell = self.fp.tell
while 1:
if tell:
startofline = tell()
try:
startofline = tell()
except IOError:
startofline = tell = None
self.seekable = 0
line = self.fp.readline()
if not line:
self.status = 'EOF in headers'