Remove list comprehensions for python 2.3 compatibility.

This commit is contained in:
Avery Pennarun 2010-10-01 11:55:45 -07:00
parent 518df41049
commit 7d3028dee2
2 changed files with 7 additions and 3 deletions

View File

@ -122,8 +122,9 @@ def main():
socket.fromfd(sys.stdout.fileno(),
socket.AF_INET, socket.SOCK_STREAM))
handlers.append(mux)
routepkt = ''.join('%s,%d\n' % r
for r in routes)
routepkt = ''
for r in routes:
routepkt += '%s,%d\n' % r
mux.send(0, ssnet.CMD_ROUTES, routepkt)
hw = Hostwatch()

View File

@ -247,7 +247,10 @@ class Mux(Handler):
return self.chani
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):
if self.fullness > 32768: