[Rpm-metadata] genpkgmetadata.py
James Antill
james at linux.duke.edu
Fri Feb 29 21:47:46 UTC 2008
genpkgmetadata.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 9062aec1e79b371bf243658c6d2c9a5b4e21f8b8
Author: James Antill <james at and.org>
Date: Fri Feb 29 16:12:32 2008 -0500
Fix line overflow, minor IO optimisation
diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index e9de6b3..03f2b31 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -140,8 +140,9 @@ class MDCallBack(object):
print thing
def progress(self, item, current, total):
- sys.stdout.write('\r' + ' ' * 80)
- sys.stdout.write("\r%d/%d - %s" % (current, total, item))
+ beg = "%*d/%d - " % (len(str(total)), current, total)
+ left = 80 - len(beg)
+ sys.stdout.write("\r%s%-*.*s" % (beg, left, left, item))
sys.stdout.flush()
def main(args):
More information about the Rpm-metadata
mailing list