better PEP-8 compliance
This commit is contained in:
parent
ee26391a11
commit
1eeddf5900
5 changed files with 16 additions and 14 deletions
|
|
@ -218,7 +218,6 @@ errback is called with error constant as parameter:
|
|||
- ProfileUnknownError: the profile name is unknown
|
||||
- ConnectedProfileError: a connected profile would not be deleted
|
||||
|
||||
|
||||
[registerNewAccount]
|
||||
deprecated=
|
||||
type=method
|
||||
|
|
|
|||
|
|
@ -85,5 +85,6 @@ class BridgeInitError(Exception):
|
|||
class BridgeExceptionNoService(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class DatabaseError(Exception):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ class SAT(service.Service):
|
|||
"""
|
||||
profile = self.memory.getProfileName(profile_key)
|
||||
if not profile:
|
||||
log.error(_('Trying to connect a non-exsitant profile'))
|
||||
log.error(_('Trying to connect a non-existant profile'))
|
||||
raise exceptions.ProfileUnknownError(profile_key)
|
||||
|
||||
if self.isConnected(profile):
|
||||
|
|
@ -219,6 +219,7 @@ class SAT(service.Service):
|
|||
except ValueError:
|
||||
log.error(_("Can't parse port value, using default value"))
|
||||
port = 5222
|
||||
|
||||
current = self.profiles[profile] = xmpp.SatXMPPClient(
|
||||
self, profile,
|
||||
jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key=profile), profile),
|
||||
|
|
@ -279,7 +280,6 @@ class SAT(service.Service):
|
|||
list_d.addCallback(logPluginResults)
|
||||
return list_d
|
||||
|
||||
|
||||
d.addCallback(pluginsConnection)
|
||||
return d
|
||||
|
||||
|
|
|
|||
|
|
@ -598,11 +598,11 @@ class Params(object):
|
|||
"""Return a node from the param_xml
|
||||
@param name: name of the node
|
||||
@param category: category of the node
|
||||
@type_: keyword for search:
|
||||
@param type_: keyword for search:
|
||||
@ALL@ search everywhere
|
||||
@GENERAL@ only search in general type
|
||||
@INDIVIDUAL@ only search in individual type
|
||||
@return: a tuple with the node type and the the node, or None if not found"""
|
||||
@return: a tuple (node type, node) or None if not found"""
|
||||
|
||||
for type_node in self.dom.documentElement.childNodes:
|
||||
if (((type_ == "@ALL@" or type_ == "@GENERAL@") and type_node.nodeName == C.GENERAL)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ class SqliteStorage(object):
|
|||
for statement in statements:
|
||||
interaction.execute(statement)
|
||||
|
||||
|
||||
#Profiles
|
||||
def _profilesCache(self, profiles_result):
|
||||
"""Fill the profiles cache
|
||||
|
|
@ -544,7 +543,7 @@ class Updater(object):
|
|||
# Database is not up-to-date, we'll do the update
|
||||
log.info(_("Database schema has changed, local database will be updated"))
|
||||
update_raw = []
|
||||
for version in xrange(local_version+1, CURRENT_DB_VERSION+1):
|
||||
for version in xrange(local_version + 1, CURRENT_DB_VERSION + 1):
|
||||
try:
|
||||
update_data = DATABASE_SCHEMAS[version]
|
||||
except KeyError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue