From bda0ec2be3797c1f3d295cf246097ab6a988ff36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Prchl=C3=ADk?= Date: Thu, 13 Jun 2019 09:45:07 +0200 Subject: [PATCH] When tool logs the exception, don't use .message attribute (#70) Some exceptions don't have it, rely on exceptions' str() --- gluetool/tool.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gluetool/tool.py b/gluetool/tool.py index 69ffefd4..3f979087 100644 --- a/gluetool/tool.py +++ b/gluetool/tool.py @@ -202,10 +202,13 @@ def _handle_failure_core(self, failure): exit_status = 0 if failure.soft is True else -1 if failure.module: - msg = "Pipeline reported an exception in module '{}': {}".format(failure.module.unique_name, failure.exc_info[1].message) + msg = "Pipeline reported an exception in module '{}': {}".format( + failure.module.unique_name, + failure.exc_info[1] + ) else: - msg = "Pipeline reported an exception: {}".format(failure.exc_info[1].message) + msg = "Pipeline reported an exception: {}".format(failure.exc_info[1]) logger.error(msg, exc_info=failure.exc_info)