From 8fa744582291aa45fcc5c8101b8f2c24744a399f Mon Sep 17 00:00:00 2001 From: Martin Chovanec Date: Sun, 9 Jul 2017 18:45:15 +0200 Subject: [PATCH] Fix #67 - print error message and exit when started without params. --- sacredboard/bootstrap.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sacredboard/bootstrap.py b/sacredboard/bootstrap.py index 8580e49..bf6803e 100755 --- a/sacredboard/bootstrap.py +++ b/sacredboard/bootstrap.py @@ -86,8 +86,10 @@ def run(debug, no_browser, m, mu, mc, f): elif f: app.config["data"] = FileStorage(f) else: - print("Must specify either a mongodb instance or \ - a path to a file storage.") + print("Must specify either a mongodb instance or " + + "a path to a file storage.\nRun sacredboard --help " + "for more information.", file=sys.stderr) + sys.exit(1) app.config['DEBUG'] = debug app.debug = debug