Commit 425a3025 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Add debug mode

parent ea439a4b
......@@ -30,6 +30,8 @@ server_socket_host = 127.0.0.1
server_socket_port = 8080
# date format
date_format = %d/%m/%Y
# debug
debug = False
[email]
# if you want an email to be sent at the end of the workflow execution
......
......@@ -133,3 +133,9 @@ class JFlowConfigReader(object):
def get_browse_root_dir(self):
return self.reader.get("storage", "browse_root_dir")
def get_debug(self):
try:
return self.reader.get("global", "debug") == "True"
except NoOptionError:
return False
......@@ -951,7 +951,10 @@ class Workflow(threading.Thread):
if self.__step is not None:
self._serialize()
self._log(str(e), traceback=traceback.format_exc(chain=False))
if self.jflow_config_reader.get_debug():
print(traceback.format_exc(chain=True), file=sys.stderr)
utils.display_error_message(str(e))
finally:
if self.__step is not None:
self._send_email()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment