From 47ba5182a93af5ac552d87f92ca31b523e05a71d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 30 Dec 2021 21:39:33 -0500 Subject: tweaked formatting. too spiralled out to explain --- lib/xas/message.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/xas/message.py b/lib/xas/message.py index dc673ef..e297e40 100644 --- a/lib/xas/message.py +++ b/lib/xas/message.py @@ -5,9 +5,11 @@ class Formatter(): def fmt(self, lookup, code, text=None): status = lookup(code) - output = "%04d :: Code %03d :: %s" % (self.id, code, status.typeobj.name) + output = "%04d :: Code %03d" % (self.id, code) - if status.typeobj.name != status.description: + if status.typeobj.name == status.description: + output += " :: " + status.typeobj.name + else: output += " :: " + status.description if text is not None: -- cgit v1.2.3