summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-06-14 20:37:37 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-06-14 20:37:37 +0200
commitdc0b022247b85a6e8d4e60415417e9b5790efe27 (patch)
tree48ad57fd2377eb3ba9fe5d59eda297317dc4f9f5
parentfcc908f1823891c8e64a3eaa29de403882836ffb (diff)
Correctly report choice locations in some warnings
Menu nodes were added to choices after parsing their properties, making some warnings generated during parsing (as opposed to in _check_choice_sanity()) incorrectly give the choice as '<choice> (undefined)'. Add the node before parsing choice properties to fix those warnings.
-rw-r--r--kconfiglib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 0deed4a..8993af6 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2060,12 +2060,12 @@ class Kconfig(object):
node.filename = self._filename
node.linenr = self._linenr
+ choice.nodes.append(node)
+
self._parse_properties(node)
self._parse_block(_T_ENDCHOICE, node, node)
node.list = node.next
- choice.nodes.append(node)
-
prev.next = prev = node
elif t0 == _T_MAINMENU: