From 2acd8aa41580aaccc4119a6f504bdfb5e986e0c2 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 3 Oct 2016 08:29:30 +0000 Subject: Debug: sanitize some output --- wqflask/utility/tools.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'wqflask/utility') diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 22779739..545c0427 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -50,7 +50,7 @@ def get_setting(command_id,guess=None): if command is None: command = value(guess) if command is None or command == "": - print command + # print command raise Exception(command_id+' setting unknown or faulty (update default_settings.py?).') logger.debug("Set "+command_id+"="+str(command)) return command @@ -170,15 +170,14 @@ def show_settings(): logging.basicConfig(level=log_level) logger.info(BLUE+"Mr. Mojo Risin 2"+ENDC) - print "runserver.py: ****** The webserver has the following configuration ******" + print "runserver.py: ****** Webserver configuration ******" keylist = app.config.keys() keylist.sort() for k in keylist: try: - print("%s %s%s%s%s" % (k,BLUE,BOLD,get_setting(k),ENDC)) + print("%s: %s%s%s%s" % (k,BLUE,BOLD,get_setting(k),ENDC)) except: - print("%s %s%s%s%s" % (k,GREEN,BOLD,app.config[k],ENDC)) - + print("%s: %s%s%s%s" % (k,GREEN,BOLD,app.config[k],ENDC)) # Cached values WEBSERVER_MODE = get_setting('WEBSERVER_MODE') -- cgit v1.2.3