From a984947846c7b83d3151fc4987ca615edcb168ef Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Oct 2020 15:05:16 +0200 Subject: i18n for survey --- bin/taler-merchant-demos | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos index f2318bf..e4286a2 100755 --- a/bin/taler-merchant-demos +++ b/bin/taler-merchant-demos @@ -73,11 +73,10 @@ def handle_serve_uwsgi(config, whichShop): # @param args command line options. def handle_serve_http(config, whichShop, port=None): if port is None: - try: - port = config[whichShop]["http_port"].value_int(required=True) - except ConfigurationError as ce: - print(ce) - exit(1) + port = config[whichShop]["http_port"].value_int(required=True) + if port is None: + print("'http_port' configuration option is missing") + exit(1) spec = ":%d" % (port,) try: os.execlp("uwsgi", "uwsgi", @@ -91,10 +90,14 @@ 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=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) + try: + if config_obj.value_string(which_shop, "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) + except ConfigurationError as ce: + print(ce) + exit(1) @click.command("Global shop launcher") @click.option("--config", help="Configuration file", required=False) -- cgit v1.2.3