diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-08-17 13:29:10 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-08-17 13:46:28 +0300 |
commit | d56945cc41a9588710dcea2d9c1455554cbcafa3 (patch) | |
tree | dcb440c11aa2fedc5a26e6772010b545c8c1b0f8 /nbxmpp/structs.py | |
parent | 2f4a79e0e4722e605ecc85238a22584fe601088c (diff) |
Use error_factory() everywhere
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r-- | nbxmpp/structs.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index 2299a06..3ae0cea 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -29,7 +29,6 @@ from nbxmpp.const import MessageType from nbxmpp.const import AvatarState from nbxmpp.const import StatusCode from nbxmpp.const import PresenceType -from nbxmpp.const import Error from nbxmpp.const import LOCATION_DATA from nbxmpp.const import AdHocStatus @@ -648,20 +647,3 @@ class PresenceProperties: return self.muc_user.role except Exception: return None - - -class ErrorProperties: - def __init__(self, stanza): - for child in stanza.getTag('error').getChildren(): - if child.getNamespace() == NS_STANZAS: - try: - self.type = Error(child.name) - except ValueError: - self.type = Error('unknown-error') - break - self.legacy_code = stanza.getErrorCode() - self.legacy_type = stanza.getErrorType() - self.message = stanza.getErrorMsg() - - def __str__(self): - return '%s %s' % (self.type, self.message) |