diff --git a/src/conversation_textview.py b/src/conversation_textview.py index eb55ac4c8..c1bc80249 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -31,7 +31,7 @@ from calendar import timegm from common.fuzzyclock import FuzzyClock from htmltextview import HtmlTextView - +from common.exceptions import GajimGeneralException as GajimGeneralException class ConversationTextview: '''Class for the conversation textview (where user reads already said messages) @@ -443,7 +443,7 @@ class ConversationTextview: gajim.interface.roster.new_chat_from_jid(self.account, jid) def on_join_group_chat_menuitem_activate(self, widget, room_jid): - if gajim.interface.instances[self.account].has_key('join_gc'): + if 'join_gc' in gajim.interface.instances[self.account]: instance = gajim.interface.instances[self.account]['join_gc'] instance.xml.get_widget('room_jid_entry').set_text(room_jid) gajim.interface.instances[self.account]['join_gc'].window.present() @@ -451,7 +451,7 @@ class ConversationTextview: try: gajim.interface.instances[self.account]['join_gc'] = \ dialogs.JoinGroupchatWindow(self.account, room_jid) - except RuntimeError: + except GajimGeneralException: pass def on_add_to_roster_activate(self, widget, jid): diff --git a/src/dialogs.py b/src/dialogs.py index de826764c..eae459362 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -2176,7 +2176,7 @@ class InvitationReceivedDialog: self.dialog.destroy() try: JoinGroupchatWindow(self.account, self.room_jid) - except RuntimeError: + except GajimGeneralException: pass class ProgressDialog: diff --git a/src/disco.py b/src/disco.py index 1354a11ac..4dd082a5b 100644 --- a/src/disco.py +++ b/src/disco.py @@ -1532,7 +1532,7 @@ class MucBrowser(AgentBrowser): try: room_jid = '%s@%s' % (service, room) dialogs.JoinGroupchatWindow(self.account, service) - except RuntimeError: + except GajimGeneralException: pass else: gajim.interface.instances[self.account]['join_gc'].window.present()