Commit fe096977 authored by Philipp Hörist's avatar Philipp Hörist

Fix various pylint errors

parent 75c28d25
Pipeline #4691 failed with stages
in 2 minutes and 53 seconds
......@@ -1423,9 +1423,9 @@ class Connection(CommonConnection, ConnectionHandlers):
'_stun._udp.' + helpers.idn_to_ascii(hostname),
self._on_stun_resolved)
def _on_stun_resolved(self, host, result_array):
def _on_stun_resolved(self, _host, result_array):
if result_array:
self._stun_servers = self._hosts = [i for i in result_array]
self._stun_servers = self._hosts = result_array
@helpers.call_counter
def connect_machine(self, restart=False):
......
......@@ -87,7 +87,8 @@ class FilesProp:
def deleteFileProp(cls, file_prop):
files_props = cls._files_props
a = s = None
for account, sid in files_props:
for key in files_props:
account, sid = key
fp = files_props[account, sid]
if fp is file_prop:
a = account
......
......@@ -263,8 +263,7 @@ def temp_failure_retry(func, *args, **kwargs):
except (os.error, IOError, select.error) as ex:
if ex.errno == errno.EINTR:
continue
else:
raise
raise
def get_uf_show(show, use_mnemonic=False):
"""
......
......@@ -383,7 +383,7 @@ class JingleSession:
if child.getNamespace() == nbxmpp.NS_JINGLE_ERRORS:
error_name = child.getName()
break
elif child.getNamespace() == nbxmpp.NS_STANZAS:
if child.getNamespace() == nbxmpp.NS_STANZAS:
error_name = child.getName()
self.__dispatch_error(error_name, text, error.getAttr('type'))
......
......@@ -870,7 +870,7 @@ class AgentBrowser:
if identity.category == 'server' and identity.name is not None:
name = identity.name
break
elif identities[0].name is not None:
if identities[0].name is not None:
name = identities[0].name
if name:
......
......@@ -638,7 +638,6 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
tag = self.textbuf.create_tag() # we create anonymous tag
for attr, val in style_iter(style):
attr = attr.lower()
val = val
try:
getattr(self, self.__style_methods[attr])(tag, val)
except KeyError:
......
......@@ -1445,7 +1445,6 @@ class Interface:
@staticmethod
def _create_muc_data(account, room_jid, password, config):
nick = app.nicks[account]
password = password
# Fetch data from bookmarks
con = app.connections[account]
......
......@@ -779,7 +779,7 @@ class MessageWindow(EventHelper):
if ctrl.get_nb_unread() > 0:
found = True
break # found
elif app.config.get('ctrl_tab_go_to_next_composing'):
if app.config.get('ctrl_tab_go_to_next_composing'):
# Search for a composing contact
contact = ctrl.contact
if first_composing_ind == -1 and contact.chatstate == 'composing':
......
......@@ -592,14 +592,14 @@ class GajimRemote(Server):
connected_account = acct
break
# jid is in roster
elif contact:
if contact:
minimized_control = \
jid in app.interface.minimized_controls[acct]
connected_account = acct
break
# we send the message to jid not in roster, because account is
# specified, or there is only one account
elif account:
if account:
connected_account = acct
elif first_connected_acct is None:
first_connected_acct = acct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment