aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/server/serve.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-21 17:22:09 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-21 17:22:09 +0100
commitaefe76fbc7ac68ab9786d84e9cbb0962f0600fd2 (patch)
tree76e2d107cccf56dc0a82b4c03869c36a1be4d591 /src/hydrilla/server/serve.py
parent2780d327bbcac5df1bc7b3f45f11be42eb5781f2 (diff)
downloadhaketilo-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/serve.py')
-rw-r--r--src/hydrilla/server/serve.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py
index a5cdee8..075eaef 100644
--- a/src/hydrilla/server/serve.py
+++ b/src/hydrilla/server/serve.py
@@ -570,12 +570,10 @@ def start(malcontent_dir: Optional[str], hydrilla_project_url: Optional[str],
port: Optional[int], config_path: Optional[str],
language: Optional[str]) -> None:
"""<this will be replaced by a localized docstring for Click to pick up>"""
- if config_path is None:
- config_path = here / 'config.json'
- else:
- config_path = Path(config)
+ config_load_opts = {} if config_path is None \
+ else {'config_path': [Path(config_path)]}
- hydrilla_config = config.load([config_path])
+ hydrilla_config = config.load(**config_load_opts)
if malcontent_dir is not None:
hydrilla_config['malcontent_dir'] = str(Path(malcontent_dir).resolve())