[yum-commits] repoquery.py
skvidal at osuosl.org
skvidal at osuosl.org
Wed Sep 9 15:33:07 UTC 2009
repoquery.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 726ed2fbdc4d5010f49ec8ce1530f481af0c051b
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Wed Sep 9 11:32:06 2009 -0400
when outputting results for prcos (or anything, really) if there is
nothing returned from doQuery() then don't print it. It just means that
repoquery --conflicts -a outputs at least one line per pkg which is
annoying
diff --git a/repoquery.py b/repoquery.py
index 58af7ca..7e9add1 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -497,13 +497,17 @@ class YumBaseQuery(yum.YumBase):
for pkg in pkgs:
for oper in self.pkgops:
try:
- print to_unicode(pkg.doQuery(oper))
+ out = pkg.doQuery(oper)
+ if out:
+ print to_unicode(out)
except queryError, e:
self.logger.error( e.msg)
for prco in items:
for oper in self.sackops:
try:
- for p in self.doQuery(oper, prco): print p
+ for p in self.doQuery(oper, prco):
+ if p:
+ print p
except queryError, e:
self.logger.error( e.msg)
More information about the Yum-commits
mailing list