comparison mercurial/keepalive.py @ 14494:1ffeeb91c55d

check-code: flag 0/1 used as constant Boolean expression
author Martin Geisler <mg@lazybytes.net>
date Wed, 01 Jun 2011 12:38:46 +0200
parents 4612cded5176
children a7d5816087a9
comparison
equal deleted inserted replaced
14493:5cc7905bccc9 14494:1ffeeb91c55d
505 return data 505 return data
506 506
507 def readlines(self, sizehint = 0): 507 def readlines(self, sizehint = 0):
508 total = 0 508 total = 0
509 list = [] 509 list = []
510 while 1: 510 while True:
511 line = self.readline() 511 line = self.readline()
512 if not line: 512 if not line:
513 break 513 break
514 list.append(line) 514 list.append(line)
515 total += len(line) 515 total += len(line)
652 m = md5.new(foo) 652 m = md5.new(foo)
653 print format % ('keepalive read', m.hexdigest()) 653 print format % ('keepalive read', m.hexdigest())
654 654
655 fo = urllib2.urlopen(url) 655 fo = urllib2.urlopen(url)
656 foo = '' 656 foo = ''
657 while 1: 657 while True:
658 f = fo.readline() 658 f = fo.readline()
659 if f: 659 if f:
660 foo = foo + f 660 foo = foo + f
661 else: break 661 else: break
662 fo.close() 662 fo.close()