diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-12 02:11:22 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-12 02:11:22 (GMT) |
commit | d192c925ac0d8e7801462b71cd0be033ddb18103 (patch) | |
tree | 43eb5af5dc808d5d3c1892096ceed5fecdf3d60a /Lib/BaseHTTPServer.py | |
parent | fb9ce65a91d674b1a80174c70a025aee83783388 (diff) | |
download | cpython-d192c925ac0d8e7801462b71cd0be033ddb18103.zip cpython-d192c925ac0d8e7801462b71cd0be033ddb18103.tar.gz cpython-d192c925ac0d8e7801462b71cd0be033ddb18103.tar.bz2 |
Updated all import statements to use the new socketserver module name.
Renamed socketserver module in its own documentation.
Renamed documentation references.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r-- | Lib/BaseHTTPServer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py index 97d800c..4f3d27a 100644 --- a/Lib/BaseHTTPServer.py +++ b/Lib/BaseHTTPServer.py @@ -74,7 +74,7 @@ import sys import time import socket # For gethostbyaddr() import mimetools -import SocketServer +import socketserver # Default error message template DEFAULT_ERROR_MESSAGE = """\ @@ -94,19 +94,19 @@ DEFAULT_ERROR_CONTENT_TYPE = "text/html" def _quote_html(html): return html.replace("&", "&").replace("<", "<").replace(">", ">") -class HTTPServer(SocketServer.TCPServer): +class HTTPServer(socketserver.TCPServer): allow_reuse_address = 1 # Seems to make sense in testing environment def server_bind(self): """Override server_bind to store the server name.""" - SocketServer.TCPServer.server_bind(self) + socketserver.TCPServer.server_bind(self) host, port = self.socket.getsockname()[:2] self.server_name = socket.getfqdn(host) self.server_port = port -class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler): +class BaseHTTPRequestHandler(socketserver.StreamRequestHandler): """HTTP request handler base class. |