Fix multiple-statements pylint errors
This commit is contained in:
parent
6237bfae41
commit
dea1464832
|
@ -120,7 +120,8 @@ if app.is_installed('GPG'):
|
||||||
"""
|
"""
|
||||||
Remove header and footer from data
|
Remove header and footer from data
|
||||||
"""
|
"""
|
||||||
if not data: return ''
|
if not data:
|
||||||
|
return ''
|
||||||
lines = data.splitlines()
|
lines = data.splitlines()
|
||||||
while lines[0] != '':
|
while lines[0] != '':
|
||||||
lines.remove(lines[0])
|
lines.remove(lines[0])
|
||||||
|
@ -129,7 +130,8 @@ if app.is_installed('GPG'):
|
||||||
i = 0
|
i = 0
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line:
|
if line:
|
||||||
if line[0] == '-': break
|
if line[0] == '-':
|
||||||
|
break
|
||||||
i = i+1
|
i = i+1
|
||||||
line = '\n'.join(lines[0:i])
|
line = '\n'.join(lines[0:i])
|
||||||
return line
|
return line
|
||||||
|
|
|
@ -99,7 +99,8 @@ class Zeroconf:
|
||||||
if resolved_info[i][ConstantRI.INTERFACE] == interface and resolved_info[i][ConstantRI.PROTOCOL] == protocol:
|
if resolved_info[i][ConstantRI.INTERFACE] == interface and resolved_info[i][ConstantRI.PROTOCOL] == protocol:
|
||||||
del self.contacts[key][Constant.RESOLVED_INFO][i]
|
del self.contacts[key][Constant.RESOLVED_INFO][i]
|
||||||
# if still something left, don't remove
|
# if still something left, don't remove
|
||||||
if len(self.contacts[key][Constant.RESOLVED_INFO]) > 1: return
|
if len(self.contacts[key][Constant.RESOLVED_INFO]) > 1:
|
||||||
|
return
|
||||||
del self.contacts[key]
|
del self.contacts[key]
|
||||||
self.remove_serviceCB(key)
|
self.remove_serviceCB(key)
|
||||||
return
|
return
|
||||||
|
|
|
@ -349,7 +349,8 @@ class SingleForm(Gtk.Table):
|
||||||
|
|
||||||
# for each field...
|
# for each field...
|
||||||
for field in self._data_form.iter_fields():
|
for field in self._data_form.iter_fields():
|
||||||
if field.type_ == 'hidden': continue
|
if field.type_ == 'hidden':
|
||||||
|
continue
|
||||||
|
|
||||||
commonlabel = True
|
commonlabel = True
|
||||||
commonlabelcenter = False
|
commonlabelcenter = False
|
||||||
|
|
|
@ -2034,7 +2034,8 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
sensitive appropriately
|
sensitive appropriately
|
||||||
"""
|
"""
|
||||||
# we have nothing to do if we don't have buttons...
|
# we have nothing to do if we don't have buttons...
|
||||||
if self.subscribe_button is None: return
|
if self.subscribe_button is None:
|
||||||
|
return
|
||||||
|
|
||||||
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
||||||
if not iter_ or self.subscriptions is None:
|
if not iter_ or self.subscriptions is None:
|
||||||
|
@ -2053,7 +2054,8 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
Called when 'post' button is pressed. Open window to create post
|
Called when 'post' button is pressed. Open window to create post
|
||||||
"""
|
"""
|
||||||
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
||||||
if iter_ is None: return
|
if iter_ is None:
|
||||||
|
return
|
||||||
|
|
||||||
groupnode = model.get_value(iter_, 1) # 1 = groupnode
|
groupnode = model.get_value(iter_, 1) # 1 = groupnode
|
||||||
|
|
||||||
|
@ -2064,7 +2066,8 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
Called when 'subscribe' button is pressed. Send subscribtion request
|
Called when 'subscribe' button is pressed. Send subscribtion request
|
||||||
"""
|
"""
|
||||||
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
||||||
if iter_ is None: return
|
if iter_ is None:
|
||||||
|
return
|
||||||
|
|
||||||
node = model.get_value(iter_, 1) # 1 = groupnode
|
node = model.get_value(iter_, 1) # 1 = groupnode
|
||||||
|
|
||||||
|
@ -2077,7 +2080,8 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
Called when 'unsubscribe' button is pressed. Send unsubscription request
|
Called when 'unsubscribe' button is pressed. Send unsubscription request
|
||||||
"""
|
"""
|
||||||
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
model, iter_ = self.window.services_treeview.get_selection().get_selected()
|
||||||
if iter_ is None: return
|
if iter_ is None:
|
||||||
|
return
|
||||||
|
|
||||||
node = model.get_value(iter_, 1) # 1 = groupnode
|
node = model.get_value(iter_, 1) # 1 = groupnode
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue