From 635e309d41eaf246ebb918ecd975ad665d62e2e0 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Wed, 6 Jun 2018 14:33:38 +0200 Subject: [PATCH] use repr on logging invalid status (#24245) --- wcs/wf/wscall.py | 4 ++-- wcs/workflows.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wcs/wf/wscall.py b/wcs/wf/wscall.py index 111474c4..db9cdf55 100644 --- a/wcs/wf/wscall.py +++ b/wcs/wf/wscall.py @@ -395,7 +395,7 @@ class WebserviceCallStatusItem(WorkflowStatusItem): self.parent.parent.get_status(action) except KeyError: try: - raise IndexError('reference to invalid status %s in workflow %s, status %s' % ( + raise IndexError('reference to invalid status %r in workflow %r, status %r' % ( action, self.parent.parent.name, self.parent.name)) except IndexError as e: get_publisher().notify_of_exception(sys.exc_info(), context='[WSCALL]') @@ -416,7 +416,7 @@ class WebserviceCallStatusItem(WorkflowStatusItem): target = self.parent.parent.get_status(value) except KeyError: get_publisher().get_app_logger().error( - 'reference to invalid status in workflow %s, status %s, item %s' % ( + 'reference to invalid status in workflow %r, status %r, item %r' % ( self.parent.parent.name, self.parent.name, self.description)) diff --git a/wcs/workflows.py b/wcs/workflows.py index 266932bf..bc064e5f 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -1727,7 +1727,7 @@ class WorkflowStatusItem(XmlSerialisable): targets = [x for x in self.parent.parent.possible_status if x.id == self.status] if not targets: get_publisher().get_app_logger().error( - 'reference to invalid status in workflow %s, status %s, item %s' % ( + 'reference to invalid status in workflow %r, status %r, item %r' % ( self.parent.parent.name, self.parent.name, self.description)) -- 2.17.1