[yum-commits] repoquery.py

skvidal at osuosl.org skvidal at osuosl.org
Tue May 17 04:17:37 UTC 2011


 repoquery.py |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 335a475479567668eb0090fad5e9fbfcf72ad20d
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue May 17 00:17:20 2011 -0400

        - fix rh bug: #705179
        - fix fmt_queryformat not being happy with new 'output' formats passed
          everywhere else.

diff --git a/repoquery.py b/repoquery.py
index 8d3cdb5..75846cb 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -240,7 +240,7 @@ class pkgQuery:
         # for subclasses to implement
         raise NotImplementedError
 
-    def fmt_queryformat(self):
+    def fmt_queryformat(self, **kw):
 
         if not self.qf:
             return self.fmt_nevra()
@@ -930,12 +930,13 @@ class YumBaseQuery(yum.YumBase):
                 pkgs = self.matchSrcPkgs(items)
 
             else:
+                pkgs = []
                 if not self.sackops:
                     plain_pkgs = True
-                try:
-                    pkgs = self.matchPkgs(items, plain_pkgs=plain_pkgs)
-                except yum.Errors.RepoError, e:
-                    raise queryError("Could not match packages: %s" % to_unicode(e))
+                    try:
+                        pkgs = self.matchPkgs(items, plain_pkgs=plain_pkgs)
+                    except yum.Errors.RepoError, e:
+                        raise queryError("Could not match packages: %s" % to_unicode(e))
                 for prco in items:
                     for oper in self.sackops:
                         try:


More information about the Yum-commits mailing list