summaryrefslogtreecommitdiff
path: root/lib/thandy/ClientCLI.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-03-19 12:11:49 -0400
committerNick Mathewson <nickm@torproject.org>2009-03-19 12:11:49 -0400
commitb6b677c18061ba87494e59b8fedd721988eb5b6c (patch)
treea668241cb59a543b54872a976de711807c6069e6 /lib/thandy/ClientCLI.py
parent714d37da91c34db5911e413d53ab544f7ef5a9a3 (diff)
Actually enforce file lengths when downloading.
Most of the code was already written for this, but we didn't actually pass the length fields we'd parsed to the downloading logic.
Diffstat (limited to 'lib/thandy/ClientCLI.py')
-rw-r--r--lib/thandy/ClientCLI.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py
index 1994049..e5b23e5 100644
--- a/lib/thandy/ClientCLI.py
+++ b/lib/thandy/ClientCLI.py
@@ -108,9 +108,11 @@ def update(args):
# until all downloading files are finished.
while True:
hashes = {}
+ lengths = {}
installable = {}
logging.info("Checking for files to update.")
files = repo.getFilesToUpdate(trackingBundles=args, hashDict=hashes,
+ lengthDict=lengths,
usePackageSystem=use_packagesys,
installableDict=installable)
@@ -186,6 +188,7 @@ def update(args):
f, repo.getFilename(f),
mirrorlist,
wantHash=hashes.get(f),
+ wantLength=lengths.get(f),
repoFile=repo.getRequestedFile(f),
useTor=(socksPort!=None))