summaryrefslogtreecommitdiff
path: root/sleekxmpp/exceptions.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-14 16:18:44 -0500
committerLance Stout <lancestout@gmail.com>2011-02-14 16:18:44 -0500
commita278f79bdbdb842193092a9e0176ecb8b1867762 (patch)
treec55be3e45f61133c01969be201d3a6476dbe5762 /sleekxmpp/exceptions.py
parent606c369173e7a31d793540d90e425a78c2a81253 (diff)
parentd709f8db657aa1d1314082d842dd29e2546739c4 (diff)
downloadslixmpp-a278f79bdbdb842193092a9e0176ecb8b1867762.tar.gz
slixmpp-a278f79bdbdb842193092a9e0176ecb8b1867762.tar.bz2
slixmpp-a278f79bdbdb842193092a9e0176ecb8b1867762.tar.xz
slixmpp-a278f79bdbdb842193092a9e0176ecb8b1867762.zip
Merge branch 'develop' into roster
Conflicts: sleekxmpp/clientxmpp.py
Diffstat (limited to 'sleekxmpp/exceptions.py')
-rw-r--r--sleekxmpp/exceptions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/exceptions.py b/sleekxmpp/exceptions.py
index d3988b4a..4727f0c6 100644
--- a/sleekxmpp/exceptions.py
+++ b/sleekxmpp/exceptions.py
@@ -21,7 +21,8 @@ class XMPPError(Exception):
"""
def __init__(self, condition='undefined-condition', text=None, etype=None,
- extension=None, extension_ns=None, extension_args=None):
+ extension=None, extension_ns=None, extension_args=None,
+ clear=True):
"""
Create a new XMPPError exception.
@@ -37,6 +38,9 @@ class XMPPError(Exception):
extension_args -- Content and attributes for the extension
element. Same as the additional arguments to
the ET.Element constructor.
+ clear -- Indicates if the stanza's contents should be
+ removed before replying with an error.
+ Defaults to True.
"""
if extension_args is None:
extension_args = {}
@@ -44,6 +48,7 @@ class XMPPError(Exception):
self.condition = condition
self.text = text
self.etype = etype
+ self.clear = clear
self.extension = extension
self.extension_ns = extension_ns
self.extension_args = extension_args