From 5301dcd4a00b6e525d11daac7db4d713ebc1488d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 11 Mar 2009 09:17:23 +0000 Subject: [PATCH] check OSError from gtkspell.py. Fixes #4897 --- src/chat_control.py | 2 +- src/config.py | 4 ++-- src/dialogs.py | 2 +- src/gajim.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 857ac9ac4..a7aa40bc9 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -314,7 +314,7 @@ class ChatControlBase(MessageControl): if lang: self.msg_textview.lang = lang spell.set_language(lang) - except (gobject.GError, RuntimeError, TypeError): + except (gobject.GError, RuntimeError, TypeError, OSError): dialogs.AspellDictError(lang) def on_msg_textview_populate_popup(self, textview, menu): diff --git a/src/config.py b/src/config.py index 113340d73..a4e85cec0 100644 --- a/src/config.py +++ b/src/config.py @@ -636,7 +636,7 @@ class PreferencesWindow: if isinstance(ctrl, chat_control.ChatControlBase): try: spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview) - except (TypeError, RuntimeError): + except (TypeError, RuntimeError, OSError): spell_obj = None if not spell_obj: @@ -663,7 +663,7 @@ class PreferencesWindow: tv = gtk.TextView() try: gtkspell.Spell(tv, lang) - except (TypeError, RuntimeError): + except (TypeError, RuntimeError, OSError): dialogs.ErrorDialog( _('Dictionary for lang %s not available') % lang, _('You have to install %s dictionary to use spellchecking, or ' diff --git a/src/dialogs.py b/src/dialogs.py index de8e7f5b6..bdd5d4338 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -2203,7 +2203,7 @@ class SingleMessageWindow: lang = gajim.LANG gtkspell.Spell(self.conversation_textview.tv, lang) gtkspell.Spell(self.message_textview, lang) - except (gobject.GError, TypeError, RuntimeError): + except (gobject.GError, TypeError, RuntimeError, OSError): AspellDictError(lang) self.prepare_widgets_for(self.action) diff --git a/src/gajim.py b/src/gajim.py index 41f9e1057..a5fa42ac6 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -3409,7 +3409,7 @@ class Interface: try: import gtkspell spell = gtkspell.Spell(tv, lang) - except (ImportError, TypeError, RuntimeError): + except (ImportError, TypeError, RuntimeError, OSError): dialogs.AspellDictError(lang) if gajim.config.get('soundplayer') == '':