[Python-checkins] CVS: python/dist/src/Lib mimetypes.py,1.15,1.16

Fred L. Drake fdrake@users.sourceforge.net
Thu, 16 Aug 2001 08:54:30 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv456

Modified Files:
	mimetypes.py 
Log Message:

Bad bug: the MimeTypes.readfp() was supposed to take a file object as a
parameter, but did not.  This was found because it can create failures
elsewhere based on the presence of mime.types files in some common locations
the module searches by default.

(I will be writing a test for this module shortly!)


Index: mimetypes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetypes.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** mimetypes.py	2001/08/03 21:01:44	1.15
--- mimetypes.py	2001/08/16 15:54:28	1.16
***************
*** 131,139 ****
          fp.close()
  
!     def readfp(self):
          """Read a single mime.types-format file."""
          map = self.types_map
          while 1:
!             line = f.readline()
              if not line:
                  break
--- 131,139 ----
          fp.close()
  
!     def readfp(self, fp):
          """Read a single mime.types-format file."""
          map = self.types_map
          while 1:
!             line = fp.readline()
              if not line:
                  break