summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfiglib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 6b031ae..155a79d 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -5695,7 +5695,9 @@ def _decoding_error(e, filename, macro_linenr=None):
def _name_and_loc(sc):
# Helper for giving the symbol/choice name and location(s) in e.g. warnings
- name = sc.name or "<choice>"
+ # Reuse the expression format. That way choices show up as
+ # '<choice (name, if any)>'
+ name = standard_sc_expr_str(sc)
if not sc.nodes:
return name + " (undefined)"