changeset 27:a24c2476f7e0

tmp (wokkel.rsm): RSMError now inherit from StanzaError, so they are correctly handled by services
author Goffi <goffi@goffi.org>
date Fri, 08 Jan 2016 17:24:32 +0100
parents e5dfb97424d5
children c782fb5237f8
files wokkel/rsm.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/wokkel/rsm.py	Thu Jan 07 23:03:15 2016 +0100
+++ b/wokkel/rsm.py	Fri Jan 08 17:24:32 2016 +0100
@@ -25,6 +25,7 @@
 """
 
 from twisted.words.xish import domish
+from twisted.words.protocols.jabber import error
 
 import pubsub
 import copy
@@ -33,10 +34,12 @@
 NS_RSM = 'http://jabber.org/protocol/rsm'
 
 
-class RSMError(Exception):
+class RSMError(error.StanzaError):
     """
     RSM error.
     """
+    def __init__(self, text=None):
+        error.StanzaError.__init__(self, 'bad-request', text=text)
 
 
 class RSMNotFoundError(Exception):