taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit a3f0d4936a2778aaa139855f11b2f5a42c628023
parent f9915ab8a3006a6633aad4101a1a798382afa39b
Author: MS <ms@taler.net>
Date:   Fri,  9 Oct 2020 13:57:23 +0200

fix configuration parsing

Diffstat:
Mbin/taler-merchant-demos | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos @@ -91,7 +91,7 @@ def handle_serve_http(config, whichShop, port=None): sys.exit(1) def handle_serve_from_config(config_obj, which_shop): - if config_obj.value_string("blog", "serve", required=False) == "http": + if config_obj.value_string("blog", "serve", required=True).lower() == "http": http_port = config_obj.value_int(which_shop, "port") return handle_serve_http(config_obj, which_shop, http_port) handle_serve_uwsgi(config_obj, which_shop) @@ -108,8 +108,7 @@ def demos(config, http_port, which_shop): os.environ["TALER_CONFIG_FILE"] = config config_obj = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE")) if http_port: - handle_serve_http(config_obj, which_shop, http_port) - else: - handle_serve_from_config(config_obj, which_shop) - handle_serve_uwsgi(config_obj, which_shop) + return handle_serve_http(config_obj, which_shop, http_port) + handle_serve_from_config(config_obj, which_shop) + demos()