[yum-git] yum/packages.py
James Antill
james at linux.duke.edu
Tue Mar 25 20:42:01 UTC 2008
yum/packages.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
New commits:
commit b547fe3ddc9601d63c8decdf75439708db23f59e
Author: James Antill <james at and.org>
Date: Tue Mar 25 16:38:18 2008 -0400
Use re_glob() instead of function
diff --git a/yum/packages.py b/yum/packages.py
index 7ffa184..6246c2a 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -90,13 +90,6 @@ def parsePackages(pkgs, usercommands, casematch=0,
takes an optional casematch option to determine if case should be matched
exactly. Defaults to not matching."""
- def contains(haystack, needle):
- """ If anything from needle is in haystack, return True. """
- for x in needle:
- if x in haystack:
- return True
- return False
-
pkgdict = buildPkgRefDict(pkgs, bool(casematch))
exactmatch = []
matched = []
@@ -110,7 +103,7 @@ def parsePackages(pkgs, usercommands, casematch=0,
else:
# anything we couldn't find a match for
# could mean it's not there, could mean it's a wildcard
- if contains(command, "*,[]{}?"):
+ if misc.re_glob(command):
trylist = pkgdict.keys()
# command and pkgdict are already lowered if not casematch
# so case sensitive is always fine
More information about the Yum-cvs-commits
mailing list