summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-04-22 21:24:28 -0700
committerNathan Fritz <nathan@andyet.net>2010-04-22 21:24:28 -0700
commit602a6d8491171de5cccb332684813e71f5d33c43 (patch)
treedfdc53119b3c28ec0d5ec61eb47ebf515d6fcd77 /sleekxmpp/stanza
parent37b571c55ab00b3107a480027f0ba212831bf7ed (diff)
downloadslixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.gz
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.bz2
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.xz
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.zip
bugfixes and continuing to work on pubsub tests
Diffstat (limited to 'sleekxmpp/stanza')
-rw-r--r--sleekxmpp/stanza/rootstanza.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/rootstanza.py b/sleekxmpp/stanza/rootstanza.py
index 9c147e40..3b4822d8 100644
--- a/sleekxmpp/stanza/rootstanza.py
+++ b/sleekxmpp/stanza/rootstanza.py
@@ -10,6 +10,7 @@ from xml.etree import cElementTree as ET
from . error import Error
from .. exceptions import XMPPError
import traceback
+import sys
class RootStanza(StanzaBase):
@@ -24,7 +25,10 @@ class RootStanza(StanzaBase):
self['error']['type'] = e.etype
else: # we probably didn't raise this on purpose, so send back a traceback
self['error']['condition'] = 'undefined-condition'
- self['error']['text'] = traceback.format_tb(e.__traceback__)
+ if sys.version_info < (3,0):
+ self['error']['text'] = "SleekXMPP got into trouble."
+ else:
+ self['error']['text'] = traceback.format_tb(e.__traceback__)
self.send()
# all jabber:client root stanzas should have the error plugin