diff options
Diffstat (limited to 'doc/examples/progress.py')
| -rw-r--r-- | doc/examples/progress.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/examples/progress.py b/doc/examples/progress.py index c56734b7..83847598 100644 --- a/doc/examples/progress.py +++ b/doc/examples/progress.py @@ -1,8 +1,7 @@ -import apt -from apt import SizeToStr import sys import time -import string + +import apt class TextProgress(apt.OpProgress): @@ -39,8 +38,8 @@ class TextFetchProgress(apt.FetchProgress): def pulse(self): print "Pulse: CPS: %s/s; Bytes: %s/%s; Item: %s/%s" % ( - SizeToStr(self.currentCPS), SizeToStr(self.currentBytes), - SizeToStr(self.totalBytes), self.currentItems, self.totalItems) + apt.SizeToStr(self.currentCPS), SizeToStr(self.currentBytes), + apt.SizeToStr(self.totalBytes), self.currentItems, self.totalItems) return True def mediaChange(self, medium, drive): |
