mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-23 02:38:30 +02:00
Remove list comprehensions for python 2.3 compatibility.
This commit is contained in:
parent
518df41049
commit
7d3028dee2
@ -122,8 +122,9 @@ def main():
|
|||||||
socket.fromfd(sys.stdout.fileno(),
|
socket.fromfd(sys.stdout.fileno(),
|
||||||
socket.AF_INET, socket.SOCK_STREAM))
|
socket.AF_INET, socket.SOCK_STREAM))
|
||||||
handlers.append(mux)
|
handlers.append(mux)
|
||||||
routepkt = ''.join('%s,%d\n' % r
|
routepkt = ''
|
||||||
for r in routes)
|
for r in routes:
|
||||||
|
routepkt += '%s,%d\n' % r
|
||||||
mux.send(0, ssnet.CMD_ROUTES, routepkt)
|
mux.send(0, ssnet.CMD_ROUTES, routepkt)
|
||||||
|
|
||||||
hw = Hostwatch()
|
hw = Hostwatch()
|
||||||
|
5
ssnet.py
5
ssnet.py
@ -247,7 +247,10 @@ class Mux(Handler):
|
|||||||
return self.chani
|
return self.chani
|
||||||
|
|
||||||
def amount_queued(self):
|
def amount_queued(self):
|
||||||
return sum(len(b) for b in self.outbuf)
|
total = 0
|
||||||
|
for b in self.outbuf:
|
||||||
|
total += len(b)
|
||||||
|
return total
|
||||||
|
|
||||||
def check_fullness(self):
|
def check_fullness(self):
|
||||||
if self.fullness > 32768:
|
if self.fullness > 32768:
|
||||||
|
Loading…
Reference in New Issue
Block a user