From: Cameron Dale Date: Fri, 11 Apr 2008 19:47:57 +0000 (-0700) Subject: Minor typo fixes in the Peer manager. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f0796336aaebe37fdf50d650fdc6fae72dbb4553;p=quix0rs-apt-p2p.git Minor typo fixes in the Peer manager. --- diff --git a/apt_p2p/PeerManager.py b/apt_p2p/PeerManager.py index 9bf4b4d..dd39e41 100644 --- a/apt_p2p/PeerManager.py +++ b/apt_p2p/PeerManager.py @@ -333,7 +333,7 @@ class FileDownload: break elif max_found == max(pieces_dl_hash.values()): # Large number of pieces stored in peers - for pieces, num in pieces_hash.items(): + for pieces, num in pieces_dl_hash.items(): # Find the most popular piece hash to download if num == max_found: log.msg('Found a hash for pieces to lookup in peers: %r' % pieces) @@ -407,7 +407,7 @@ class FileDownload: break log.msg('Done sending piece hash requests for now, %d outstanding' % self.outstanding) - if self.pieces is None and self.outstanding == 0: + if self.pieces is None and self.outstanding <= 0: # Continue without the piece hashes log.msg('Could not retrieve the piece hashes from the peers') self.pieces = []