From 24db0fb98b41245b52306f45a6d4c381caa94255 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 10 Dec 2006 20:36:10 +0000 Subject: Add an allow_blockers parameter to isvalidatom so that the behavior is optional. Thanks to Brian Harring for the suggestion. svn path=/main/trunk/; revision=5264 --- pym/portage_dep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/portage_dep.py b/pym/portage_dep.py index f284ae73a..7a4d76aae 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -313,7 +313,7 @@ def dep_getslot(mydep): _invalid_atom_chars_regexp = re.compile("[()|?]") -def isvalidatom(atom): +def isvalidatom(atom, allow_blockers=False): """ Check to see if a depend atom is valid @@ -333,7 +333,7 @@ def isvalidatom(atom): global _invalid_atom_chars_regexp if _invalid_atom_chars_regexp.search(atom): return 0 - if atom.startswith("!"): + if allow_blockers and atom.startswith("!"): atom = atom[1:] mycpv_cps = catpkgsplit(dep_getcpv(atom)) operator = get_operator(atom) -- cgit v1.2.3-1-g7c22