diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-04-27 20:56:36 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-04-27 20:56:36 -0700 |
commit | c260933b121be4478b0e1b5a50d1862a7860fd0e (patch) | |
tree | 6a9b05a696e3d213042be7e32151e3409231bbe5 /pym/portage | |
parent | 3002478e1906336cdd683826771cd485a3a9f66c (diff) | |
download | portage-c260933b121be4478b0e1b5a50d1862a7860fd0e.tar.gz portage-c260933b121be4478b0e1b5a50d1862a7860fd0e.tar.bz2 portage-c260933b121be4478b0e1b5a50d1862a7860fd0e.zip |
Add a Package.iuse.is_valid_flag() method to replace the regex attribute,
in order to avoid compiling regex for each Package instance.
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/dep/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index abe5a0666..341953930 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1185,10 +1185,10 @@ def match_from_list(mydep, candidate_list): for x in candidate_list: use = getattr(x, "use", None) if use is not None: - regex = x.iuse.regex + is_valid_flag = x.iuse.is_valid_flag missing_iuse = False for y in mydep.use.required: - if regex.match(y) is None: + if not is_valid_flag(y): missing_iuse = True break if missing_iuse: |