summaryrefslogtreecommitdiff
path: root/lib/thandy/download.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@torproject.org>2011-09-03 21:58:47 -0300
committerTomás Touceda <chiiph@torproject.org>2011-09-03 21:58:47 -0300
commit7d87a55747e82c7b23daa48581135c35b553aeaf (patch)
tree18e44364fea284cc9cce86299272f143d0e952ba /lib/thandy/download.py
parentf04c3429dc33c9bcadfe8a3707f8646690838db8 (diff)
Improve re-install behavior
Also add more controller oriented output
Diffstat (limited to 'lib/thandy/download.py')
-rwxr-xr-xlib/thandy/download.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/thandy/download.py b/lib/thandy/download.py
index 52c6fe4..c2a9e61 100755
--- a/lib/thandy/download.py
+++ b/lib/thandy/download.py
@@ -13,6 +13,8 @@ import thandy.util
import thandy.socksurls
import thandy.checkJson
+from thandy.util import logCtrl
+
class BadCompoundData(thandy.DownloadError):
"""DOCDOC"""
pass
@@ -514,6 +516,7 @@ class DownloadJob:
total += len(c)
logging.debug("Got %s/%s bytes from %s",
total, expectLength, url)
+ logCtrl("DOWNLOAD", TOTAL=str(total), EXPECT=str(expectLength), URL=url)
if self._wantLength != None and total > self._wantLength:
logging.warn("Read too many bytes from %s; got %s, but "
"wanted %s", url, total, self._wantLength)