mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-07-07 18:17:20 +02:00
Update flake8 and pyflakes
This commit is contained in:
@ -227,7 +227,7 @@ class SockWrapper:
|
||||
return 0
|
||||
|
||||
def write(self, buf):
|
||||
assert(buf)
|
||||
assert buf
|
||||
return self.uwrite(buf)
|
||||
|
||||
def uread(self):
|
||||
@ -402,15 +402,15 @@ class Mux(Handler):
|
||||
elif cmd == CMD_EXIT:
|
||||
self.ok = False
|
||||
elif cmd == CMD_TCP_CONNECT:
|
||||
assert(not self.channels.get(channel))
|
||||
assert not self.channels.get(channel)
|
||||
if self.new_channel:
|
||||
self.new_channel(channel, data)
|
||||
elif cmd == CMD_DNS_REQ:
|
||||
assert(not self.channels.get(channel))
|
||||
assert not self.channels.get(channel)
|
||||
if self.got_dns_req:
|
||||
self.got_dns_req(channel, data)
|
||||
elif cmd == CMD_UDP_OPEN:
|
||||
assert(not self.channels.get(channel))
|
||||
assert not self.channels.get(channel)
|
||||
if self.got_udp_open:
|
||||
self.got_udp_open(channel, data)
|
||||
elif cmd == CMD_ROUTES:
|
||||
@ -482,8 +482,8 @@ class Mux(Handler):
|
||||
if len(self.inbuf) >= (self.want or HDR_LEN):
|
||||
(s1, s2, channel, cmd, datalen) = \
|
||||
struct.unpack('!ccHHH', self.inbuf[:HDR_LEN])
|
||||
assert(s1 == b('S'))
|
||||
assert(s2 == b('S'))
|
||||
assert s1 == b('S')
|
||||
assert s2 == b('S')
|
||||
self.want = datalen + HDR_LEN
|
||||
if self.want and len(self.inbuf) >= self.want:
|
||||
data = self.inbuf[HDR_LEN:self.want]
|
||||
|
Reference in New Issue
Block a user