Do not split on command_deny as it is unneeded

This commit is contained in:
mathieui 2012-04-18 00:17:16 +02:00
parent 3138240150
commit 3a1a1dcc6d

View file

@ -1763,12 +1763,12 @@ class RosterInfoTab(Tab):
self.core.information_win.rebuild_everything(self.core.information_buffer) self.core.information_win.rebuild_everything(self.core.information_buffer)
self.refresh() self.refresh()
def command_deny(self, args): def command_deny(self, arg):
""" """
/deny [jid]
Denies a JID from our roster Denies a JID from our roster
""" """
args = args.split() if not arg:
if not args:
item = self.roster_win.selected_row item = self.roster_win.selected_row
if isinstance(item, Contact) and item.ask == 'asked': if isinstance(item, Contact) and item.ask == 'asked':
jid = item.bare_jid jid = item.bare_jid
@ -1776,7 +1776,7 @@ class RosterInfoTab(Tab):
self.core.information('No subscription to deny') self.core.information('No subscription to deny')
return return
else: else:
jid = JID(args[0]).bare jid = JID(arg).bare
if not jid in [contact.bare_jid for contact in roster.get_contacts()]: if not jid in [contact.bare_jid for contact in roster.get_contacts()]:
self.core.information('No subscription to deny') self.core.information('No subscription to deny')
return return