From 89d284fa5dbc921f4fb2695901fa7b678de3d01b Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 13 Nov 2020 01:33:21 +0100 Subject: Load config data into config tab --- muddle.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'muddle.py') diff --git a/muddle.py b/muddle.py index b1dc7f1..c7adbab 100644 --- a/muddle.py +++ b/muddle.py @@ -117,6 +117,10 @@ log.debug(f"reading config file {config_file}") config = configparser.ConfigParser() config.read(config_file) +# runtime data that should NOT be written +config.add_section("runtime_data") +config["runtime_data"]["config_path"] = str(config_file) + # S T A R T @@ -129,5 +133,5 @@ are welcome to redistribute it under certain conditions; see LICENSE.txt for details. Project repository: https://github.com/NaoPross/Muddle """) -if args.gui: - gui.start(config["server"]["url"], config["server"]["token"]) +if args.gui or config.getboolean("muddle", "always_run_gui"): + gui.start(config) -- cgit v1.2.1