From e3133a7e09eae842be16eb64d7888c5751d72e75 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 8 Mar 2009 20:25:59 +0100 Subject: * doc/examples/*.py: Fix some examples, cleanup --- doc/examples/progress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/examples/progress.py') diff --git a/doc/examples/progress.py b/doc/examples/progress.py index 304bd117..2231001f 100644 --- a/doc/examples/progress.py +++ b/doc/examples/progress.py @@ -40,7 +40,7 @@ class TextFetchProgress(apt.FetchProgress): def pulse(self): print "Pulse: CPS: %s/s; Bytes: %s/%s; Item: %s/%s" % ( - apt.SizeToStr(self.currentCPS), SizeToStr(self.currentBytes), + apt.SizeToStr(self.currentCPS), apt.SizeToStr(self.currentBytes), apt.SizeToStr(self.totalBytes), self.currentItems, self.totalItems) return True @@ -81,12 +81,12 @@ class TextCdromProgress(apt.CdromProgress): def update(self, text, step): # check if we actually have some text to display if text != "": - print "Update: %s %s" % (string.strip(text), step) + print "Update: %s %s" % (text.strip(), step) def askCdromName(self): print "Please enter cd-name: ", cd_name = sys.stdin.readline() - return (True, string.strip(cd_name)) + return (True, cd_name.strip()) def changeCdrom(self): print "Please insert cdrom and press " -- cgit v1.2.3