Fixes some style issues and minor bugs

This commit is contained in:
vieira
2017-11-11 01:30:58 +00:00
committed by Brian May
parent 9f238ebca8
commit 71d65f3831
17 changed files with 78 additions and 86 deletions

View File

@ -271,7 +271,7 @@ class Handler:
def callback(self, sock):
log('--no callback defined-- %r\n' % self)
(r, w, x) = select.select(self.socks, [], [], 0)
(r, _, _) = select.select(self.socks, [], [], 0)
for s in r:
v = s.recv(4096)
if not v:
@ -350,7 +350,7 @@ class Mux(Handler):
def next_channel(self):
# channel 0 is special, so we never allocate it
for timeout in range(1024):
for _ in range(1024):
self.chani += 1
if self.chani > MAX_CHANNEL:
self.chani = 1
@ -479,7 +479,7 @@ class Mux(Handler):
_add(w, self.wsock)
def callback(self, sock):
(r, w, x) = select.select([self.rsock], [self.wsock], [], 0)
(r, w, _) = select.select([self.rsock], [self.wsock], [], 0)
if self.rsock in r:
self.handle()
if self.outbuf and self.wsock in w: