diff options
| author | Julian Andres Klode <jak@debian.org> | 2011-04-11 11:54:15 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2011-04-11 11:54:15 +0200 |
| commit | 30bde83a45ebe2b8c401ef72f8bac3f4058614ab (patch) | |
| tree | fd4e6cc5e82beaa027bbd2ea4472e0875355cb25 /apt/progress/old.py | |
| parent | 2a0f97e8ad0ed8ac7456b8dc785071bf1c3a1847 (diff) | |
| download | python-apt-30bde83a45ebe2b8c401ef72f8bac3f4058614ab.tar.gz | |
apt.progress: Use long for ETA, natural type for size (LP: #377375)
Diffstat (limited to 'apt/progress/old.py')
| -rw-r--r-- | apt/progress/old.py | 5 |
1 files changed, 3 insertions, 2 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), |
