Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-02-11 23:29:21 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-02-11 23:30:59 +0300
commit7d504905f17de5bcfd76514fec8422c6d2bc71a4 (patch)
tree0483cbfa3f1a1771066bd253bb710bf3bb9f14b3 /nbxmpp/structs.py
parentb63d59c26c075251749c213ff6c2f046d29b2956 (diff)
Simplify CommonResult
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py15
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,)