From c891db011e75ceec10fb574bf8dc7eeaeb24f8e7 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 28 May 2019 17:07:41 +0200 Subject: Explain why node_iter() is not a good fit for write_config() --- kconfiglib.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 65399b4..1527a00 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1388,6 +1388,10 @@ class Kconfig(object): if save_old: _save_old(filename) + # node_iter() was used here before commit 3aea9f7 ("Add '# end of + # ' after menus in .config"). Those comments get tricky to + # implement with it. + with self._open(filename, "w") as f: f.write(header) @@ -1422,6 +1426,8 @@ class Kconfig(object): # No more nodes return + # Generate configuration output for the node + item = node.item if item.__class__ is Symbol: -- cgit v1.2.3