[yum-commits] Branch 'yum-3_2_X' - output.py
James Antill
james at osuosl.org
Thu Aug 27 23:49:39 UTC 2009
output.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 861fc8e769843bc59d36873edbf07fc146a4018b
Author: Pekka Pietikainen <pp at ee.oulu.fi>
Date: Thu Aug 27 19:48:49 2009 -0400
Fix printing of empty transactions, this is pretty hard to do:
echo ts | yum shell
diff --git a/output.py b/output.py
index 60c1dcf..2299a9c 100755
--- a/output.py
+++ b/output.py
@@ -903,7 +903,6 @@ class YumOutput:
"""returns a string rep of the transaction in an easy-to-read way."""
self.tsInfo.makelists(True, True)
- out = u""
pkglist_lines = []
data = {'n' : {}, 'v' : {}, 'r' : {}}
a_wid = 0 # Arch can't get "that big" ... so always use the max.
@@ -957,7 +956,9 @@ class YumOutput:
pkglist_lines.append((action, lines))
- if data['n']:
+ if not data['n']:
+ return u''
+ else:
data = [data['n'], {}, data['v'], data['r'], {}]
columns = [1, a_wid, 1, 1, 5]
columns = self.calcColumns(data, indent=" ", columns=columns,
More information about the Yum-commits
mailing list