Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/common.py @ 27044:1dde4914fb6c
hgweb: import BaseHTTPServer as module at top level
This will avoid future warning spotted by the import checker.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Nov 2015 15:07:08 +0900 |
parents | 461e7b700fdf |
children | 37fcfe52c68c |
line wrap: on
line diff
--- a/mercurial/hgweb/common.py Sun Nov 01 14:23:23 2015 +0900 +++ b/mercurial/hgweb/common.py Sun Nov 01 15:07:08 2015 +0900 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +import BaseHTTPServer import errno, mimetypes, os HTTP_OK = 200 @@ -102,8 +103,7 @@ raise AttributeError def _statusmessage(code): - from BaseHTTPServer import BaseHTTPRequestHandler - responses = BaseHTTPRequestHandler.responses + responses = BaseHTTPServer.BaseHTTPRequestHandler.responses return responses.get(code, ('Error', 'Unknown error'))[0] def statusmessage(code, message=None):