mercurial/hgweb/common.py
changeset 9031 3b76321aa0de
parent 8761 0289f384e1e5
child 9694 8269fe2d48f6
--- a/mercurial/hgweb/common.py	Sun Jul 05 11:01:01 2009 +0200
+++ b/mercurial/hgweb/common.py	Sun Jul 05 11:01:30 2009 +0200
@@ -69,7 +69,7 @@
         os.stat(path)
         ct = mimetypes.guess_type(path)[0] or "text/plain"
         req.respond(HTTP_OK, ct, length = os.path.getsize(path))
-        return file(path, 'rb').read()
+        return open(path, 'rb').read()
     except TypeError:
         raise ErrorResponse(HTTP_SERVER_ERROR, 'illegal filename')
     except OSError, err: