Commit 7d3028de authored by Avery Pennarun's avatar Avery Pennarun

Remove list comprehensions for python 2.3 compatibility.

parent 518df410
...@@ -122,8 +122,9 @@ def main(): ...@@ -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()
......
...@@ -247,7 +247,10 @@ class Mux(Handler): ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment