Proper error message when hunspell fails to load

This commit is contained in:
Kovid Goyal 2015-07-22 14:35:55 +05:30
parent 66b8f4dcc6
commit 7fafdfcd9f

View File

@ -21,7 +21,7 @@ Dictionary = namedtuple('Dictionary', 'primary_locale locales dicpath affpath bu
LoadedDictionary = namedtuple('Dictionary', 'primary_locale locales obj builtin name id')
hunspell = plugins['hunspell'][0]
if hunspell is None:
raise RuntimeError('Failed to load hunspell: %s' % plugins[1])
raise RuntimeError('Failed to load hunspell: %s' % plugins['hunspell'][1])
dprefs = JSONConfig('dictionaries/prefs.json')
dprefs.defaults['preferred_dictionaries'] = {}
dprefs.defaults['preferred_locales'] = {}