From aefe76fbc7ac68ab9786d84e9cbb0962f0600fd2 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 21 Feb 2022 17:22:09 +0100 Subject: make hydrilla.server.config.load() use the default configĀ path when none is passed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way it will be easier to create a .wsgi script for Hydrilla. --- src/hydrilla/server/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/hydrilla/server/config.py') 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)) -- cgit v1.2.3