Fix PEP8 issues

This commit is contained in:
Brian May
2016-04-30 18:08:46 +10:00
parent e73e797f33
commit f3cbc5018a
6 changed files with 13 additions and 9 deletions

View File

@ -358,8 +358,8 @@ class Mux(Handler):
def amount_queued(self):
total = 0
for b in self.outbuf:
total += len(b)
for byte in self.outbuf:
total += len(byte)
return total
def check_fullness(self):
@ -376,7 +376,8 @@ class Mux(Handler):
def send(self, channel, cmd, data):
assert isinstance(data, binary_type)
assert len(data) <= 65535
p = struct.pack('!ccHHH', b('S'), b('S'), channel, cmd, len(data)) + data
p = struct.pack('!ccHHH', b('S'), b('S'), channel, cmd, len(data)) \
+ data
self.outbuf.append(p)
debug2(' > channel=%d cmd=%s len=%d (fullness=%d)\n'
% (channel, cmd_to_name.get(cmd, hex(cmd)),
@ -557,7 +558,7 @@ def connect_dst(family, ip, port):
outsock.setsockopt(socket.SOL_IP, socket.IP_TTL, 42)
return SockWrapper(outsock, outsock,
connect_to=(ip, port),
peername = '%s:%d' % (ip, port))
peername='%s:%d' % (ip, port))
def runonce(handlers, mux):