summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-08-01 10:11:06 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-08-01 10:11:06 +0200
commit46ce7f8798bc963f1c647b21839488038a79d909 (patch)
treea5fb5443b0bcdc02b35c5d83df16a06168911e38 /apt/progress
parent941a9debfcf884aebc616053774d0fe94c2e8f59 (diff)
parentc8bd732d5cb8be16ae48f8a72a4ed8a266b4ce36 (diff)
downloadpython-apt-46ce7f8798bc963f1c647b21839488038a79d909.tar.gz
merged from the debian-sid branch
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/old.py5
-rw-r--r--apt/progress/text.py5
2 files changed, 5 insertions, 5 deletions
diff --git a/apt/progress/old.py b/apt/progress/old.py
index 4bd79f2e..364cd2ce 100644
--- a/apt/progress/old.py
+++ b/apt/progress/old.py
@@ -149,10 +149,11 @@ class TextFetchProgress(FetchProgress):
Return True to continue or False to cancel.
"""
FetchProgress.pulse(self)
+
if self.currentCPS > 0:
s = "[%2.f%%] %sB/s %s" % (self.percent,
- apt_pkg.size_to_str(int(self.currentCPS)),
- apt_pkg.time_to_str(int(self.eta)))
+ apt_pkg.size_to_str(self.currentCPS),
+ apt_pkg.time_to_str(long(self.eta)))
else:
s = "%2.f%% [Working]" % (self.percent)
print "\r%s" % (s),
diff --git a/apt/progress/text.py b/apt/progress/text.py
index d777837c..c5eec092 100644
--- a/apt/progress/text.py
+++ b/apt/progress/text.py
@@ -157,11 +157,10 @@ class AcquireProgress(base.AcquireProgress, TextProgress):
shown = False
tval = '%i%%' % percent
-
end = ""
if self.current_cps:
- eta = int(float(self.total_bytes - self.current_bytes) /
- self.current_cps)
+ eta = long(float(self.total_bytes - self.current_bytes) /
+ self.current_cps)
end = " %sB/s %s" % (apt_pkg.size_to_str(self.current_cps),
apt_pkg.time_to_str(eta))