diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-10-11 15:05:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-10-11 15:05:16 +0200 |
commit | a984947846c7b83d3151fc4987ca615edcb168ef (patch) | |
tree | b03a1524a55d2a0255f0b9c1e56061bca9358e02 /bin/taler-merchant-demos | |
parent | 1ae0306a3cf2ea27f60b2d205789994d260c2cce (diff) | |
download | taler-merchant-demos-a984947846c7b83d3151fc4987ca615edcb168ef.tar.gz taler-merchant-demos-a984947846c7b83d3151fc4987ca615edcb168ef.tar.bz2 taler-merchant-demos-a984947846c7b83d3151fc4987ca615edcb168ef.zip |
i18n for survey
Diffstat (limited to 'bin/taler-merchant-demos')
-rwxr-xr-x | bin/taler-merchant-demos | 21 |
1 files changed, 12 insertions, 9 deletions
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) |