summaryrefslogtreecommitdiff
path: root/listnewconfig.py
AgeCommit message (Collapse)Author
2019-06-03Have load_config() and write_(min_)config() return messagesUlf Magnusson
Hardcoding load_config() and write_(min_)config() to write any message to stdout is awkward, because it means that the message can't be easily reused when stdout is the wrong place to write it to (e.g. in menuconfig/guiconfig). This gets extra bad now that there's also the "No change to ..." message. Modify load_config() and write_(min_)config() to return the message as a string instead, and have them always return a message, instead of just when 'filename' is None and verbose=True. This makes things flexible and straightforward. Use the new behavior in menuconfig.py and guiconfig.py. They now show "No change to ..." when saving a file doesn't modify it. Tools that want to write messages to stdout should now do print(kconf.load_config()) / print(kconf.write_config()). There's no clean way to preserve perfect backwards compatibility here, but keep accepting the 'verbose' argument and print a deprecation warning if a value is ever passed for it. That way, scripts will keep running, though possibly with less output on stdout. This changes the meaning of the load_config() return value as well, though I suspect it was only ever used by the menuconfig/guiconfig interfaces. The new behavior applies for kconfiglib.VERSION >= (12, 0, 0).
2019-03-22Whitespace consistency nitUlf Magnusson
2019-03-22Convert some comments to module docstrings in utilitiesUlf Magnusson
This makes running pydoc(3) on the utilities helpful. Reuse the module docstring for the --help text for utilities that use argparse. Also fix some copy-paste errors in the all*config.py descriptions and clean up the language a bit. Piggyback removal of an optimization in allmodconfig.py that's pretty irrelevant now.
2019-03-06listnewconfig: Remove redundant backslashUlf Magnusson
2019-03-06Use a consistent style in small utilitiesUlf Magnusson
Also remove some no longer used imports.
2019-01-15Update copyright years for 2019Ulf Magnusson
2018-12-08listnewconfig: Add scriptUlf Magnusson
Mirrors 'make listnewconfig' in the C tools.