diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-02-11 23:29:21 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-02-11 23:30:59 +0300 |
commit | 7d504905f17de5bcfd76514fec8422c6d2bc71a4 (patch) | |
tree | 0483cbfa3f1a1771066bd253bb710bf3bb9f14b3 /nbxmpp/structs.py | |
parent | b63d59c26c075251749c213ff6c2f046d29b2956 (diff) |
Simplify CommonResult
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r-- | nbxmpp/structs.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index 4c69303..bdebf41 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -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: - @property - def is_error(self): - return self.error is not None - - -class CommonResult(BaseResult, namedtuple('CommonResult', 'jid error')): - pass - -CommonResult.__new__.__defaults__ = (None,) |