use GajimGeneralException instead of RuntimeError everywhere we meant to use that

This commit is contained in:
Nikos Kouremenos 2006-10-08 12:07:33 +00:00
parent 54265a93bd
commit 8d74950f42
3 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ from calendar import timegm
from common.fuzzyclock import FuzzyClock from common.fuzzyclock import FuzzyClock
from htmltextview import HtmlTextView from htmltextview import HtmlTextView
from common.exceptions import GajimGeneralException as GajimGeneralException
class ConversationTextview: class ConversationTextview:
'''Class for the conversation textview (where user reads already said messages) '''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) gajim.interface.roster.new_chat_from_jid(self.account, jid)
def on_join_group_chat_menuitem_activate(self, widget, room_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 = gajim.interface.instances[self.account]['join_gc']
instance.xml.get_widget('room_jid_entry').set_text(room_jid) instance.xml.get_widget('room_jid_entry').set_text(room_jid)
gajim.interface.instances[self.account]['join_gc'].window.present() gajim.interface.instances[self.account]['join_gc'].window.present()
@ -451,7 +451,7 @@ class ConversationTextview:
try: try:
gajim.interface.instances[self.account]['join_gc'] = \ gajim.interface.instances[self.account]['join_gc'] = \
dialogs.JoinGroupchatWindow(self.account, room_jid) dialogs.JoinGroupchatWindow(self.account, room_jid)
except RuntimeError: except GajimGeneralException:
pass pass
def on_add_to_roster_activate(self, widget, jid): def on_add_to_roster_activate(self, widget, jid):

View file

@ -2176,7 +2176,7 @@ class InvitationReceivedDialog:
self.dialog.destroy() self.dialog.destroy()
try: try:
JoinGroupchatWindow(self.account, self.room_jid) JoinGroupchatWindow(self.account, self.room_jid)
except RuntimeError: except GajimGeneralException:
pass pass
class ProgressDialog: class ProgressDialog:

View file

@ -1532,7 +1532,7 @@ class MucBrowser(AgentBrowser):
try: try:
room_jid = '%s@%s' % (service, room) room_jid = '%s@%s' % (service, room)
dialogs.JoinGroupchatWindow(self.account, service) dialogs.JoinGroupchatWindow(self.account, service)
except RuntimeError: except GajimGeneralException:
pass pass
else: else:
gajim.interface.instances[self.account]['join_gc'].window.present() gajim.interface.instances[self.account]['join_gc'].window.present()