From de457bf476143b1f617378c7215503b777a743cc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 5 Aug 2005 09:23:13 +0000 Subject: * improved the examples, added README too --- doc/examples/progress.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/examples/progress.py') diff --git a/doc/examples/progress.py b/doc/examples/progress.py index e2ff97e2..d820fcb2 100644 --- a/doc/examples/progress.py +++ b/doc/examples/progress.py @@ -1,4 +1,5 @@ import apt +from apt import SizeToStr import sys import time import string @@ -32,7 +33,8 @@ class TextFetchProgress(apt.FetchProgress): def updateStatus(self, uri, descr, shortDescr, status): print "UpdateStatus: '%s' '%s' '%s' '%i'" % (uri,descr,shortDescr, status) def pulse(self): - print "Pulse: CPS: %s/s; Bytes: %s/%s; Item: %s/%s" % (apt_pkg.SizeToStr(self.currentCPS), apt_pkg.SizeToStr(self.currentBytes), apt_pkg.SizeToStr(self.totalBytes), self.currentItems, self.totalItems) + print "Pulse: CPS: %s/s; Bytes: %s/%s; Item: %s/%s" % (SizeToStr(self.currentCPS), SizeToStr(self.currentBytes), SizeToStr(self.totalBytes), self.currentItems, self.totalItems) + return True def mediaChange(self, medium, drive): print "Please insert medium %s in drive %s" % (medium, drive) -- cgit v1.2.3