Implement the suggestion of bug_id=122070: surround tell() call with
try/except.
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 @@
             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'