updates to gui to match changes to interfaces

updates to gui to match changes to interfaces

now packaged with poetry and on pypi
This commit is contained in:
onyx-and-iris
2022-06-16 23:53:28 +01:00
parent 0688a36a76
commit 2c39b9d215
15 changed files with 273 additions and 78 deletions

View File

@@ -1,6 +1,7 @@
import toml
from pathlib import Path
import tomllib
configuration = {}
config_path = [Path.cwd() / "configs"]
@@ -11,8 +12,9 @@ for path in config_path:
for filename in filenames:
name = filename.with_suffix("").stem
try:
configs[name] = toml.load(filename)
except toml.TomlDecodeError:
with open(filename, "rb") as f:
configs[name] = tomllib.load(f)
except tomllib.TOMLDecodeError:
print(f"Invalid TOML profile: configs/{filename.stem}")
for name, cfg in configs.items():