[yum-commits] repoquery.py

zpavlas at osuosl.org zpavlas at osuosl.org
Thu Oct 31 10:02:13 UTC 2013


 repoquery.py |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit b2bfab1865dfa08a8c615297d3597fbb028a6497
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Thu Oct 31 10:58:41 2013 +0100

    repoquery --whatrequires/--whatprovides: handle MiscError. BZ 1024783
    
    Move the MiscError handler to toplevel, so we handle --whatrequires
    and --whatprovides cases too.

diff --git a/repoquery.py b/repoquery.py
index 2410d08..6a4f663 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -859,8 +859,6 @@ class YumBaseQuery(yum.YumBase):
                     pkgs = self.pkgSack.returnNewestByNameArch(**kwargs)
                 except yum.Errors.PackageSackError:
                     pkgs = []
-                except (yum.Errors.RepoError, yum.Errors.MiscError), e:
-                    raise queryError(e)
         else:
             what = self.options.pkgnarrow
             ygh = self.doPackageLists(what, **kwargs)
@@ -1535,10 +1533,7 @@ def main(args):
 
     try:
         repoq.runQuery(regexs)
-    except yum.Errors.RepoError, e:
-        repoq.logger.error(e)
-        sys.exit(1)
-    except queryError, e:
+    except (yum.Errors.RepoError, yum.Errors.MiscError, queryError), e:
         repoq.logger.error(e)
         sys.exit(1)
 


More information about the Yum-commits mailing list