[yum-commits] yum/repos.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Mon Jul 15 08:04:50 UTC 2013
yum/repos.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit d824c3cc70092d0f00c404aebd4db03fda4eb1b8
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Jul 15 10:02:23 2013 +0200
findRepos: handle re.compile() errors. BZ 984356
diff --git a/yum/repos.py b/yum/repos.py
index f1c24a9..67ef1e4 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -15,7 +15,6 @@
# Copyright 2004 Duke University
import re
-import fnmatch
import types
import logging
import misc
@@ -213,10 +212,7 @@ class RepoStorage:
for item in pattern.split(','):
item = item.strip()
- if ignore_case:
- match = re.compile(fnmatch.translate(item), re.I).match
- else:
- match = re.compile(fnmatch.translate(item)).match
+ match = misc.compile_pattern(item.strip(), ignore_case)
for name,repo in self.repos.items():
assert name == repo.id
if match(name):
More information about the Yum-commits
mailing list