From 95660d6891ae2391469ee3d2183e774bd7c03ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Tue, 7 Jun 2011 12:24:07 +0000 Subject: [PATCH] index: Use ctx.ui.info() instead of plain print --- pisi/index.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pisi/index.py b/pisi/index.py index 3b2676f5..810dd36d 100644 --- a/pisi/index.py +++ b/pisi/index.py @@ -114,7 +114,7 @@ class Index(xmlfile.XmlFile): if fn == 'groups.xml': self.groups.extend(add_groups(os.path.join(root, fn))) - print + ctx.ui.info("") # Create a process pool, as many processes as the number of CPUs we # have @@ -132,7 +132,7 @@ class Index(xmlfile.XmlFile): # not using CLI, you must handle KeyboardException yourself) pool.terminate() pool.join() - print + ctx.ui.info("") raise try: @@ -162,15 +162,13 @@ class Index(xmlfile.XmlFile): except: pool.terminate() pool.join() - print + ctx.ui.info("") raise + ctx.ui.info("") pool.close() pool.join() - # Clean up output - ctx.ui.info("\r%-80.80s" % (_('Done.'))) - def add_package(params): try: path, deltas, repo_uri = params @@ -190,7 +188,7 @@ def add_package(params): # check package semantics errs = md.errors() if md.errors(): - print + ctx.ui.info("") ctx.ui.error(_('Package %s: metadata corrupt, skipping...') % md.package.name) ctx.ui.error(unicode(Error(*errs))) else: