summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-03-25 23:51:45 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-03-25 23:54:21 +0200
commit7374891d0a9b455ff7d20e84efd0e6b1e3705c11 (patch)
tree323d2ee9b4726870c43e2367dd64559992ff0b11
parent225ec4bc3e6a2b88e14d58522494950d9c9e8236 (diff)
merge_config.py: Clean up name_and_loc_str()
- Rename to name_and_loc(), to be consistent with the kconfiglib.py version - Use a comment instead of a docstring. Shorten the description a bit too. - Piggyback a missing # in conf3 in the module docstring. Typo.
-rw-r--r--examples/merge_config.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/merge_config.py b/examples/merge_config.py
index a6110f8..a51738c 100644
--- a/examples/merge_config.py
+++ b/examples/merge_config.py
@@ -37,7 +37,7 @@
# # Ops... assigned twice
# # CONFIG_FOO is not set
#
-# Ops... this symbol doesn't exist
+# # Ops... this symbol doesn't exist
# CONFIG_OPS=y
#
# CONFIG_BAZ="baz string"
@@ -85,12 +85,9 @@ kconf.write_config(sys.argv[2])
# Print warnings for symbols whose actual value doesn't match the assigned
# value
-def name_and_loc_str(sym):
- """
- Helper for printing the symbol name along with the location(s) in the
- Kconfig files where the symbol is defined
- """
- # If the symbol has no menu nodes, it is undefined
+def name_and_loc(sym):
+ # Helper for printing symbol names and Kconfig file location(s) in warnings
+
if not sym.nodes:
return sym.name + " (undefined)"
@@ -112,4 +109,4 @@ for sym in kconf.defined_syms:
if user_value != sym.str_value:
print('warning: {} was assigned the value "{}" but got the '
'value "{}" -- check dependencies'
- .format(name_and_loc_str(sym), user_value, sym.str_value))
+ .format(name_and_loc(sym), user_value, sym.str_value))