From f0796336aaebe37fdf50d650fdc6fae72dbb4553 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Fri, 11 Apr 2008 12:47:57 -0700 Subject: [PATCH] Minor typo fixes in the Peer manager. --- apt_p2p/PeerManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = [] -- 2.39.5