[stephan]use for-else statement (one less var used)
This commit is contained in:
parent
23aaea5803
commit
7b5997156b
|
@ -1733,7 +1733,6 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def load_iconset(self, path):
|
def load_iconset(self, path):
|
||||||
imgs = {}
|
imgs = {}
|
||||||
for state in ('connecting', 'online', 'chat', 'away', 'xa',
|
for state in ('connecting', 'online', 'chat', 'away', 'xa',
|
||||||
|
@ -2002,13 +2001,11 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
if model.iter_n_children(iter_group_source) == 1: #this was the only child
|
if model.iter_n_children(iter_group_source) == 1: #this was the only child
|
||||||
model.remove(iter_group_source)
|
model.remove(iter_group_source)
|
||||||
#delete the group if it is empty (need to look for offline users too)
|
#delete the group if it is empty (need to look for offline users too)
|
||||||
group_empty = True
|
|
||||||
for jid in gajim.contacts[account]:
|
for jid in gajim.contacts[account]:
|
||||||
if grp_source in gajim.contacts[account][jid][0].groups:
|
if group in gajim.contacts[account][jid][0].groups:
|
||||||
group_empty = False
|
|
||||||
break
|
break
|
||||||
if group_empty:
|
else:
|
||||||
del gajim.groups[account][grp_source]
|
del gajim.groups[account][group]
|
||||||
if not grp_dest in u.groups:
|
if not grp_dest in u.groups:
|
||||||
u.groups.append(grp_dest)
|
u.groups.append(grp_dest)
|
||||||
self.add_contact_to_roster(data, account)
|
self.add_contact_to_roster(data, account)
|
||||||
|
|
Loading…
Reference in New Issue