tmp (wokkel.mam): MAMErrow now inherit from StanzaError so it can be handler properly by services
This commit is contained in:
parent
237a47ab27
commit
e6a8b8ac85
1 changed files with 6 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ from zope.interface import Interface
|
|||
from twisted.words.protocols.jabber import xmlstream
|
||||
from twisted.words.xish import domish
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.words.protocols.jabber import error
|
||||
from twisted.internet import defer
|
||||
from twisted.python import log
|
||||
|
||||
|
|
@ -53,10 +54,14 @@ PREFS_SET_REQUEST = "/iq[@type='set']/prefs[@xmlns='%s']" % NS_MAM
|
|||
|
||||
# TODO: add the tests!
|
||||
|
||||
class MAMError(Exception):
|
||||
|
||||
class MAMError(error.StanzaError):
|
||||
"""
|
||||
MAM error.
|
||||
"""
|
||||
def __init__(self, text=None):
|
||||
error.StanzaError.__init__(self, 'bad-request', text=text)
|
||||
|
||||
|
||||
class Unsupported(MAMError):
|
||||
def __init__(self, feature, text=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue