diff options
author | XANTRONIX Development | 2021-12-30 21:39:33 -0500 |
---|---|---|
committer | XANTRONIX Development | 2021-12-30 21:39:33 -0500 |
commit | 47ba5182a93af5ac552d87f92ca31b523e05a71d (patch) | |
tree | 51fe3f11328462a792a07c5c317c753fa3552ff9 /lib | |
parent | 688008fb961b7f9763139d6ac711272179a4e14b (diff) | |
download | xas-47ba5182a93af5ac552d87f92ca31b523e05a71d.tar.gz xas-47ba5182a93af5ac552d87f92ca31b523e05a71d.tar.bz2 xas-47ba5182a93af5ac552d87f92ca31b523e05a71d.zip |
tweaked formatting. too spiralled out to explain
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xas/message.py | 6 |
1 files 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: |