hgweb: import BaseHTTPServer as module at top level
authorYuya Nishihara <yuya@tcha.org>
Sun, 01 Nov 2015 15:07:08 +0900
changeset 27044 1dde4914fb6c
parent 27043 ccdc95c6841e
child 27045 eac72c1e1e0d
hgweb: import BaseHTTPServer as module at top level This will avoid future warning spotted by the import checker.
mercurial/hgweb/common.py
--- 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):