Commit c24ad29c authored by Denis Bilenko's avatar Denis Bilenko

http: don't use "import as" without a necessity

parent 7d22540e
...@@ -4,7 +4,7 @@ import traceback ...@@ -4,7 +4,7 @@ import traceback
from gevent import core from gevent import core
from gevent.greenlet import Greenlet from gevent.greenlet import Greenlet
from gevent.event import Event from gevent.event import Event
import _socket as socket import _socket
class HTTPServer(object): class HTTPServer(object):
...@@ -47,10 +47,10 @@ class HTTPServer(object): ...@@ -47,10 +47,10 @@ class HTTPServer(object):
def make_listener(self, address, backlog=None): def make_listener(self, address, backlog=None):
if backlog is None: if backlog is None:
backlog = self.backlog backlog = self.backlog
sock = socket.socket() sock = _socket.socket()
try: try:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1) sock.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, sock.getsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR) | 1)
except socket.error: except _socket.error:
pass pass
sock.bind(address) sock.bind(address)
sock.listen(backlog) sock.listen(backlog)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment