diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-21 17:22:09 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-21 17:22:09 +0100 |
commit | aefe76fbc7ac68ab9786d84e9cbb0962f0600fd2 (patch) | |
tree | 76e2d107cccf56dc0a82b4c03869c36a1be4d591 /src/hydrilla/server/config.py | |
parent | 2780d327bbcac5df1bc7b3f45f11be42eb5781f2 (diff) | |
download | haketilo-hydrilla-aefe76fbc7ac68ab9786d84e9cbb0962f0600fd2.tar.gz haketilo-hydrilla-aefe76fbc7ac68ab9786d84e9cbb0962f0600fd2.zip |
make hydrilla.server.config.load() use the default configĀ path when none is passed
This way it will be easier to create a .wsgi script for Hydrilla.
Diffstat (limited to 'src/hydrilla/server/config.py')
-rw-r--r-- | src/hydrilla/server/config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hydrilla/server/config.py b/src/hydrilla/server/config.py index 4b5bcd7..0155e83 100644 --- a/src/hydrilla/server/config.py +++ b/src/hydrilla/server/config.py @@ -68,7 +68,10 @@ config_schema = { } } -def load(config_paths: list[Path], can_fail: list[bool]=[]) -> dict: +here = Path(__file__).resolve().parent + +def load(config_paths: list[Path]=[here / 'config.json'], + can_fail: list[bool]=[]) -> dict: config = {} bools_missing = max(0, len(config_paths) - len(can_fail)) |