[yum-git] yum/repos.py
James Antill
james at linux.duke.edu
Wed Mar 26 14:30:06 UTC 2008
yum/repos.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 17f006ce085dc1b6f883ea4caad4d6f5a583e39e
Author: James Antill <james at and.org>
Date: Wed Mar 26 10:29:09 2008 -0400
Another glob hack, gone
diff --git a/yum/repos.py b/yum/repos.py
index c356911..377517c 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -18,12 +18,11 @@ import re
import fnmatch
import types
import logging
+import misc
import Errors
from packageSack import MetaSack
-_is_fnmatch_pattern = re.compile(r"[*?[]").search
-
class RepoStorage:
"""This class contains multiple repositories and core configuration data
about them."""
@@ -117,7 +116,7 @@ class RepoStorage:
returns repoid of disabled repos as list
"""
repos = []
- if _is_fnmatch_pattern(repoid) or repoid.find(',') != -1:
+ if misc.re_glob(repoid) or repoid.find(',') != -1:
for repo in self.findRepos(repoid):
repos.append(repo.id)
repo.disable()
@@ -135,7 +134,7 @@ class RepoStorage:
returns repoid of enables repos as list
"""
repos = []
- if _is_fnmatch_pattern(repoid) or repoid.find(',') != -1:
+ if misc.re_glob(repoid) or repoid.find(',') != -1:
for repo in self.findRepos(repoid):
repos.append(repo.id)
repo.enable()
More information about the Yum-cvs-commits
mailing list