From e805034b58be734b525092bfded98c581121eee2 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 4 Jul 2019 15:51:31 +0200 Subject: [PATCH] Improved list action to actually print config values Signed-off-by: Jim Martens --- src/twomartens/masterthesis/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/config.py b/src/twomartens/masterthesis/config.py index 1cda959..060d615 100644 --- a/src/twomartens/masterthesis/config.py +++ b/src/twomartens/masterthesis/config.py @@ -79,7 +79,11 @@ def list_property_values() -> None: _initialise_config(config_file) parser.read(config_file) - print(parser) # simple implementation, more sophisticated might follow + for section in parser: + print(f"[{section}]") + for option in parser[section]: + value = parser.get(section, option) + print(f"{option}: {value}") def get_config() -> configparser.ConfigParser: