From 9e8ab99c22a4229d218e9f5042f718c072f3d04c Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Tue, 12 Jul 2016 17:18:00 +0300 Subject: [PATCH] Fix coding style issues and typos --- neomi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neomi.py b/neomi.py index ec93ac2..ed7ace0 100644 --- a/neomi.py +++ b/neomi.py @@ -137,7 +137,7 @@ class Serve(threading.Thread): threading.Thread.__init__(self) def handle_request(self): - path, protocol, rest = get_request(self.sock) + path, protocol, rest = get_request(self.sock) answer = str((path, protocol, rest))+'\n' self.sock.sendall(answer.encode('utf-8')) @@ -185,7 +185,7 @@ def listen(port): # Create a poll object for the listening sockets and a fd->socket map listening = select.poll() - sock_by_fd={} + sock_by_fd = {} for s in listening_sockets: listening.register(s, select.POLLIN) sock_by_fd[s.fileno()] = s @@ -196,10 +196,10 @@ def listen(port): events = listening.poll() for fd,event in events: assert(event == select.POLLIN) - # Get socked from table established previously + # Get socket from table established previously s = sock_by_fd[fd] # Accept and handle the connection - conn,addr = s.accept() + conn, addr = s.accept() spawn_thread(conn, addr[0])