summaryrefslogtreecommitdiff
path: root/sleekxmpp/exceptions.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-14 16:26:23 -0500
committerLance Stout <lancestout@gmail.com>2011-02-14 16:26:23 -0500
commitd5b3a5282763e4f74816ff392bd8cd47dd9f7a95 (patch)
tree10b421c0cf9cf47997162485f35dabdccfffab69 /sleekxmpp/exceptions.py
parent1a270dc05cc368000f3545975befa0589031b684 (diff)
parentd709f8db657aa1d1314082d842dd29e2546739c4 (diff)
downloadslixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.gz
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.bz2
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.xz
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.zip
Merge branch 'develop' into stream_features
Conflicts: sleekxmpp/xmlstream/stanzabase.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