diff options
author | André Erdmann <dywi@mailerd.de> | 2014-07-29 19:39:14 +0200 |
---|---|---|
committer | André Erdmann <dywi@mailerd.de> | 2014-07-29 19:39:14 +0200 |
commit | 768b134a4a388bc11175c5ff8975369fe01317fe (patch) | |
tree | 53923fd07646e5895ed558a6cba8a616cce0aeaa /roverlay/depres | |
parent | roverlay/depres, slot rules: "wide match" (diff) | |
download | R_overlay-768b134a4a388bc11175c5ff8975369fe01317fe.tar.gz R_overlay-768b134a4a388bc11175c5ff8975369fe01317fe.tar.bz2 R_overlay-768b134a4a388bc11175c5ff8975369fe01317fe.zip |
roverlay/depres, rule constructor: accept bool value
The wide_match option accepts a boolean value now:
wide_match[=[1|y|yes|0|n|no|...]]
Diffstat (limited to 'roverlay/depres')
-rw-r--r-- | roverlay/depres/simpledeprule/rules.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roverlay/depres/simpledeprule/rules.py b/roverlay/depres/simpledeprule/rules.py index df767ba..797ba98 100644 --- a/roverlay/depres/simpledeprule/rules.py +++ b/roverlay/depres/simpledeprule/rules.py @@ -21,14 +21,16 @@ __all__ = ( ) +import roverlay.strutil +import roverlay.depres.depenv + + from roverlay.depres.simpledeprule.util import \ RuleFileSyntaxError, get_slot_restrict, get_slot_parser from roverlay.depres.simpledeprule.abstractrules import \ SimpleRule, FuzzySimpleRule -import roverlay.depres.depenv - @@ -106,7 +108,9 @@ class RuleConstructor ( object ): if not has_value: kwargs ['allow_wide_match'] = True else: - raise NotImplementedError("wide_match value") + kwargs ['allow_wide_match'] = bool ( + roverlay.strutil.str_to_bool ( value ) + ) elif opt == '*': kwargs ['slot_operator'] = '*' |