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