gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-bank] branch master updated: Address stability.


From: gnunet
Subject: [taler-bank] branch master updated: Address stability.
Date: Thu, 05 Nov 2020 14:35:32 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 9cb52b5  Address stability.
9cb52b5 is described below

commit 9cb52b57deb684323e7a6d2f206c6f3ca9d839c0
Author: MS <ms@taler.net>
AuthorDate: Thu Nov 5 14:34:46 2020 +0100

    Address stability.
    
    Fix option parsing and manage bad file path given
    in the configuration.
---
 bin/taler-bank-manage | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/taler-bank-manage b/bin/taler-bank-manage
index 3b31562..281ed2b 100755
--- a/bin/taler-bank-manage
+++ b/bin/taler-bank-manage
@@ -45,7 +45,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", 
"talerbank.settings")
 
 @click.group(help="Manager script of Taler bank.")
 @click.pass_context
-@click.option("--http-port", help="Set HTTP as the serving protocol, and set 
the port.")
+@click.option("--http-port", help="Set HTTP as the serving protocol, and set 
the port.", type=int)
 @click.option("--config", help="Path to the config file.")
 @click.option("--with-db", help="Database connection string.")
 def cli(ctx, http_port, config, with_db):
@@ -132,7 +132,11 @@ def handle_serve_uwsgi():
         mode = TC["bank"]["uwsgi_unixpath_mode"].value_filename(required=True)
         params.extend(["--socket", spec])
         params.extend(["--chmod-socket="+mode])
-        os.makedirs(os.path.dirname(spec), exist_ok=True)
+        try:
+            os.makedirs(os.path.dirname(spec), exist_ok=True)
+        except FileNotFoundError:
+            print(f"{spec} is not a valid file path.")
+            sys.exit(1)
     logging.info("launching uwsgi with argv %s", params[1:])
     os.execlp(*params)
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]