summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-05 00:19:48 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-05 00:19:48 +0000
commit896fa313d290549db43a75dd7ab0dd2b49d0aef9 (patch)
tree87e08e22da2287f01aa13dd2349305ceec5e846a /src
parent0dfd8366e1c4a750c24949b2aeed7666162af528 (diff)
downloadpoezio-896fa313d290549db43a75dd7ab0dd2b49d0aef9.tar.gz
poezio-896fa313d290549db43a75dd7ab0dd2b49d0aef9.tar.bz2
poezio-896fa313d290549db43a75dd7ab0dd2b49d0aef9.tar.xz
poezio-896fa313d290549db43a75dd7ab0dd2b49d0aef9.zip
fix a crash on a kick with no reason. Also little cleanup
Diffstat (limited to 'src')
-rw-r--r--src/gui.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gui.py b/src/gui.py
index 574368d1..0be0b6ad 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -318,7 +318,7 @@ class Gui(object):
by = presence.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}item/{http://jabber.org/protocol/muc#user}actor')
reason = presence.find('{http://jabber.org/protocol/muc#user}x/{http://jabber.org/protocol/muc#user}item/{http://jabber.org/protocol/muc#user}reason')
by = by.attrib['jid'] if by is not None else None
- reason = reason.text# if reason else ''
+ reason = reason.text if reason else ''
if from_nick == room.own_nick: # we are kicked
room.disconnect()
if by:
@@ -883,8 +883,6 @@ class Gui(object):
args = shlex.split(arg)
except ValueError as error:
return self.information(str(error), _("Error"))
- # TODO information message
- # return self.add_message_to_text_buffer(self.current_room(), _("Error: %s") % (error))
if len(args) < 1:
self.command_help('kick')
return
@@ -900,20 +898,6 @@ class Gui(object):
if res['type'] == 'error':
self.room_error(res, roomname)
- # def command_say(self, arg):
- # """
- # /say <message>
- # """
- # line = arg
- # if self.current_room().name != 'Info':
- # if self.current_room().jid is not None:
- # muc.send_private_message(self.xmpp, self.current_room().name, line)
- # self.add_message_to_text_buffer(self.current_room(), line, None, self.current_room().own_nick)
- # else:
- # muc.send_groupchat_message(self.xmpp, self.current_room().name, line)
- # self.window.input.refresh()
- # doupdate()
-
def command_join(self, arg):
"""
/join [room][/nick] [password]