PEP8 formatting updates.

This commit is contained in:
Lance Stout
2012-06-19 01:29:48 -07:00
parent f7a74d960e
commit d92aa05b5c
58 changed files with 324 additions and 289 deletions

View File

@@ -51,7 +51,7 @@ class Error(ElementBase):
namespace = 'jabber:client'
name = 'error'
plugin_attrib = 'error'
interfaces = set(('code', 'condition', 'text', 'type',
interfaces = set(('code', 'condition', 'text', 'type',
'gone', 'redirect'))
sub_interfaces = set(('text',))
plugin_attrib_map = {}

View File

@@ -78,7 +78,8 @@ class RootStanza(StanzaBase):
self['error']['type'] = 'cancel'
self.send()
# log the error
log.exception('Error handling {%s}%s stanza' , self.namespace, self.name)
log.exception('Error handling {%s}%s stanza',
self.namespace, self.name)
# Finally raise the exception to a global exception handler
self.stream.exception(e)

View File

@@ -47,7 +47,7 @@ class Roster(ElementBase):
roster versioning.
"""
return self.xml.attrib.get('ver', None)
def set_ver(self, ver):
"""
Ensure handling an empty ver attribute propery.
@@ -101,7 +101,7 @@ class Roster(ElementBase):
items[item['jid']] = item.values
# Remove extra JID reference to keep everything
# backward compatible
del items[item['jid']]['jid']
del items[item['jid']]['jid']
del items[item['jid']]['lang']
return items

View File

@@ -79,4 +79,3 @@ class StreamError(Error, StanzaBase):
def del_see_other_host(self):
self._del_sub('{%s}see-other-host' % self.condition_ns)