summaryrefslogtreecommitdiffstats
path: root/lib/xas/message.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xas/message.py')
-rw-r--r--lib/xas/message.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/xas/message.py b/lib/xas/message.py
deleted file mode 100644
index e297e40..0000000
--- a/lib/xas/message.py
+++ /dev/null
@@ -1,24 +0,0 @@
-class Formatter():
- def __init__(self, id: int, db):
- self.id = id
- self.db = db
-
- def fmt(self, lookup, code, text=None):
- status = lookup(code)
- output = "%04d :: Code %03d" % (self.id, code)
-
- if status.typeobj.name == status.description:
- output += " :: " + status.typeobj.name
- else:
- output += " :: " + status.description
-
- if text is not None:
- output += " :: " + text
-
- return output
-
- def message(self, code, text=None):
- return self.fmt(self.db.status, code, text)
-
- def error(self, code, text=None):
- return self.fmt(self.db.error, code, text)