support multi requirement with inverse for same option

This commit is contained in:
2013-07-03 15:04:15 +02:00
parent b80bef0f7e
commit 0afb521766
3 changed files with 77 additions and 7 deletions

View File

@ -360,12 +360,12 @@ class Setting(object):
raise RequirementError(_("option '{0}' has requirement's property error: "
"{1} {2}").format(opt._name, path, properties))
#transitive action, force expected
value = expected
value = expected[0]
inverse = False
except AttributeError:
raise AttributeError(_("required option not found: "
"{0}").format(path))
if not inverse and value == expected or inverse and value != expected:
if not inverse and value in expected or inverse and value not in expected:
matches = True
setting.append(action)
## the calculation cannot be carried out