diff options
author | Fred Drake <fdrake@acm.org> | 2001-08-16 15:54:28 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-08-16 15:54:28 (GMT) |
commit | c019ecb7fe7b44fa339defd071510ec2b0728775 (patch) | |
tree | 3d926b7e1707e8e53e573c89afd9a21984328953 | |
parent | 360e031f8d338b6be22ccd989473310864c454af (diff) | |
download | cpython-c019ecb7fe7b44fa339defd071510ec2b0728775.zip cpython-c019ecb7fe7b44fa339defd071510ec2b0728775.tar.gz cpython-c019ecb7fe7b44fa339defd071510ec2b0728775.tar.bz2 |
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!)
-rw-r--r-- | Lib/mimetypes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 402a1d0..f7c4a76 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -130,11 +130,11 @@ class MimeTypes: self.readfp(fp) fp.close() - def readfp(self): + def readfp(self, fp): """Read a single mime.types-format file.""" map = self.types_map while 1: - line = f.readline() + line = fp.readline() if not line: break words = line.split() |