Commit 7d504905 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Simplify CommonResult

parent b63d59c2
......@@ -34,6 +34,9 @@ StanzaHandler = namedtuple('StanzaHandler',
'name callback typ ns xmlns system priority')
StanzaHandler.__new__.__defaults__ = ('', '', None, False, 50)
CommonResult = namedtuple('CommonResult', 'jid')
CommonResult.__new__.__defaults__ = (None,)
InviteData = namedtuple('InviteData',
'muc from_ reason password type continued thread')
......@@ -369,15 +372,3 @@ class ErrorProperties:
def __str__(self):
return '%s %s' % (self.type, self.message)
class BaseResult:
def is_error(self):
return self.error is not None
class CommonResult(BaseResult, namedtuple('CommonResult', 'jid error')):
CommonResult.__new__.__defaults__ = (None,)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment