mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
Fixed some PEP8 errors in RootStanza (trailing whitespace and line length)
This commit is contained in:
parent
bd92ef6acf
commit
e8e934fa95
1 changed files with 9 additions and 7 deletions
|
@ -47,17 +47,19 @@ class RootStanza(StanzaBase):
|
||||||
self['error']['text'] = e.text
|
self['error']['text'] = e.text
|
||||||
if e.extension is not None:
|
if e.extension is not None:
|
||||||
# Extended error tag
|
# Extended error tag
|
||||||
extxml = ET.Element("{%s}%s" % (e.extension_ns, e.extension), e.extension_args)
|
extxml = ET.Element("{%s}%s" % (e.extension_ns, e.extension),
|
||||||
|
e.extension_args)
|
||||||
self['error'].append(extxml)
|
self['error'].append(extxml)
|
||||||
self['error']['type'] = e.etype
|
self['error']['type'] = e.etype
|
||||||
else:
|
else:
|
||||||
# We probably didn't raise this on purpose, so send back a traceback
|
# We probably didn't raise this on purpose, so send a traceback
|
||||||
self['error']['condition'] = 'undefined-condition'
|
self['error']['condition'] = 'undefined-condition'
|
||||||
if sys.version_info < (3, 0):
|
if sys.version_info < (3, 0):
|
||||||
self['error']['text'] = "SleekXMPP got into trouble."
|
self['error']['text'] = "SleekXMPP got into trouble."
|
||||||
else:
|
else:
|
||||||
self['error']['text'] = traceback.format_tb(e.__traceback__)
|
self['error']['text'] = traceback.format_tb(e.__traceback__)
|
||||||
logging.exception('Error handling {%s}%s stanza' % (self.namespace, self.name))
|
logging.exception('Error handling {%s}%s stanza' %
|
||||||
|
(self.namespace, self.name))
|
||||||
self.send()
|
self.send()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue