diff options
author | Lance Stout <lancestout@gmail.com> | 2010-07-29 11:02:42 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-07-29 11:02:42 -0400 |
commit | e8e934fa95ea776d067d875fa67e89cc9e273e90 (patch) | |
tree | 23938e725e45f3047b62e3a43d3494378e07bad1 | |
parent | bd92ef6acfd9b1ecd390f08b28f1a3f4e7ec69a9 (diff) | |
download | slixmpp-e8e934fa95ea776d067d875fa67e89cc9e273e90.tar.gz slixmpp-e8e934fa95ea776d067d875fa67e89cc9e273e90.tar.bz2 slixmpp-e8e934fa95ea776d067d875fa67e89cc9e273e90.tar.xz slixmpp-e8e934fa95ea776d067d875fa67e89cc9e273e90.zip |
Fixed some PEP8 errors in RootStanza (trailing whitespace and line length)
-rw-r--r-- | sleekxmpp/stanza/rootstanza.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sleekxmpp/stanza/rootstanza.py b/sleekxmpp/stanza/rootstanza.py index fb5498f5..eafc79a2 100644 --- a/sleekxmpp/stanza/rootstanza.py +++ b/sleekxmpp/stanza/rootstanza.py @@ -41,23 +41,25 @@ class RootStanza(StanzaBase): e -- Exception object """ self.reply() - if isinstance(e, XMPPError): + if isinstance(e, XMPPError): # We raised this deliberately self['error']['condition'] = e.condition self['error']['text'] = e.text - if e.extension is not None: + if e.extension is not None: # 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']['type'] = e.etype - else: - # We probably didn't raise this on purpose, so send back a traceback + else: + # We probably didn't raise this on purpose, so send a traceback self['error']['condition'] = 'undefined-condition' - if sys.version_info < (3,0): + if sys.version_info < (3, 0): self['error']['text'] = "SleekXMPP got into trouble." else: 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() |