changeset 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 ccdc95c6841e
children eac72c1e1e0d
files mercurial/hgweb/common.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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):