'No Match for argument' error message: this code is likely dead,
searchXXX and returnXXX return [] instead of raising exceptions.

Remove unnecessary branching.
---
 yum/__init__.py |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index d828b7d..70e12b7 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3851,19 +3851,11 @@ class YumBase(depsolve.Depsolve):
                     self.verbose_logger.debug(_('Checking for virtual provide 
or file-provide for %s'), 
                         arg)
 
-                    try:
-                        mypkgs = self.pkgSack.searchAll(arg, None)
-                    except yum.Errors.YumBaseError, e:
-                        self.logger.critical(_('No Match for argument: %s') % 
to_unicode(arg))
-                    else:
-                        # install MTA* == fail, because provides don't do globs
-                        # install /usr/kerberos/bin/* == success (and we want
-                        #                                all of the pkgs)
-                        if mypkgs and not misc.re_glob(arg):
-                            mypkgs = self.bestPackagesFromList(mypkgs,
-                                                               
single_name=True)
-                        if mypkgs:
-                            pkgs.extend(mypkgs)
+                    mypkgs = self.pkgSack.searchAll(arg, None)
+                    if not misc.re_glob(arg):
+                        # install /usr/kerberos/bin/* == want all pkgs
+                        mypkgs = self.bestPackagesFromList(mypkgs, 
single_name=True)
+                    pkgs.extend(mypkgs)
                         
             else:
                 nevra_dict = self._nevra_kwarg_parse(kwargs)
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to