[PATCH 2 of 4] hgweb: import BaseHTTPServer as module at top level
Yuya Nishihara
yuya at tcha.org
Thu Nov 19 08:18:55 CST 2015
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1446358028 -32400
# Sun Nov 01 15:07:08 2015 +0900
# Node ID 02988a3d85ad846d0c4594395d3b02fec988565c
# Parent 837a7c46e58c07033990f0b8b85fd537d97757b9
hgweb: import BaseHTTPServer as module at top level
This will avoid future warning spotted by the import checker.
diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -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 @@ class continuereader(object):
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):
More information about the Mercurial-devel
mailing list