diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-12 11:16:11 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-12 11:16:11 +0100 |
| commit | c6c21b2455a8ffc20c8fb5b4bedbd9a2d2eb7dab (patch) | |
| tree | 3a08b0207cbdc46483c0365df2402cd66d323390 /kconfiglib.py | |
| parent | 2f26f5c2e68a804a5f7f24482a46bf254c1120a2 (diff) | |
Re-enable set_user_value() warning for symbols with no prompts.
Disable warnings in allnoconfig_simpler.py instead.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 17afc7d..6d9f420 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2214,7 +2214,7 @@ class _HasVisibility(): """Base class for elements that have a "visibility" that acts as an upper limit on the values a user can set for them. Subclasses are Symbol and - Choice.""" + Choice (which supply some of the attributes).""" def __init__(self): self.cached_visibility = None @@ -2857,9 +2857,11 @@ class Symbol(Item, _HasVisibility): """Like set_user_value(), but does not invalidate any symbols. suppress_load_warnings -- - some warnings don't make sense when loading a .config that do make - sense when manually invoking set_user_value(). This flag is set to True to - suppress such warnings.""" + some warnings are annoying when loading a .config that can be helpful + when manually invoking set_user_value(). This flag is set to True to + suppress such warnings. + + Perhaps this could be made optional for load_config() instead.""" if self.is_special_: if self.is_from_env: @@ -2900,11 +2902,11 @@ class Symbol(Item, _HasVisibility): # This warning is annoying when running allnoconfig_simpler.py. Make it # optional? - #if self.prompts == [] and not suppress_load_warnings: - #self.config._warn('assigning "{0}" to the symbol {1} which lacks ' - #'prompts and thus has visibility "n". The assignment ' - #'will have no effect.' - #.format(v, self.name)) + if self.prompts == [] and not suppress_load_warnings: + self.config._warn('assigning "{0}" to the symbol {1} which lacks ' + 'prompts and thus has visibility "n". The assignment ' + 'will have no effect.' + .format(v, self.name)) self.user_val = v |
