From a267a679473b4f6504f9e4be6ad4f8597f8c5bdb Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 21 Nov 2023 12:52:42 +0000 Subject: [PATCH] Fix confdir passing to workers --- cista/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cista/config.py b/cista/config.py index 823451d..bb906bb 100644 --- a/cista/config.py +++ b/cista/config.py @@ -34,7 +34,7 @@ class Link(msgspec.Struct, omit_defaults=True): config = None -conffile = os.environ.get("CISTA_HOME") or Path.home() / ".local/share/cista/db.toml" +conffile = None def derived_secret(*params, len=8) -> bytes: @@ -120,7 +120,10 @@ def modifies_config(modify): def load_config(): - global config + global config, conffile + conffile = ( + Path(os.environ.get("CISTA_HOME")) or Path.home() / ".local/share/cista/db.toml" + ) config = msgspec.toml.decode(conffile.read_bytes(), type=Config, dec_hook=dec_hook)