diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-07-02 17:48:19 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-07-02 18:07:34 +0200 |
| commit | 29758ae0652799488a567df682a7ef391c68aecb (patch) | |
| tree | cbcf31c12c8c479645ed02f4eadc42c1c5c4d12b /setconfig.py | |
| parent | e62835208b15c81d1ebf79ea4d3b53200abccb25 (diff) | |
setconfig: Use 'orig_type' instead of 'type' in error message
It's confusing to have tristate symbols show up as bool in the bad-value
error message when modules are disabled. set_value() validates the value
against 'orig_type' rather than 'type' as well.
Piggyback some quote consistency and make a comment in set_value() more
informative.
Diffstat (limited to 'setconfig.py')
| -rwxr-xr-x | setconfig.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/setconfig.py b/setconfig.py index 2a14310..b689754 100755 --- a/setconfig.py +++ b/setconfig.py @@ -38,15 +38,15 @@ def main(): parser.add_argument( "--no-check-exists", - dest='check_exists', - action='store_false', + dest="check_exists", + action="store_false", help="Ignore assignments to non-existent symbols instead of erroring " "out") parser.add_argument( "--no-check-value", - dest='check_value', - action='store_false', + dest="check_value", + action="store_false", help="Ignore assignments that didn't \"take\" (where the symbol got a " "different value, e.g. due to unsatisfied dependencies) instead " "of erroring out") @@ -76,7 +76,8 @@ def main(): if not sym.set_value(value): sys.exit("error: '{}' is an invalid value for the {} symbol {}" - .format(value, kconfiglib.TYPE_TO_STR[sym.type], name)) + .format(value, kconfiglib.TYPE_TO_STR[sym.orig_type], + name)) if args.check_value and sym.str_value != value: sys.exit("error: {} was assigned the value '{}', but got the " |
