[Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.49,1.50

Guido van Rossum python-dev@python.org
Thu, 9 Nov 2000 10:05:26 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv26530

Modified Files:
	rfc822.py 
Log Message:
Implement the suggestion of bug_id=122070: surround tell() call with
try/except.


Index: rfc822.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rfc822.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** rfc822.py	2000/09/25 15:08:27	1.49
--- rfc822.py	2000/11/09 18:05:24	1.50
***************
*** 133,137 ****
          while 1:
              if tell:
!                 startofline = tell()
              line = self.fp.readline()
              if not line:
--- 133,141 ----
          while 1:
              if tell:
!                 try:
!                     startofline = tell()
!                 except IOError:
!                     startofline = tell = None
!                     self.seekable = 0
              line = self.fp.readline()
              if not line: