Ignore spell check when dictionnary is not found

Julien LepillerFri Aug 23 17:46:56+0200 2019

c971627

Ignore spell check when dictionnary is not found

offlate/ui/spellcheckedit.py

2525
class SpellCheckEdit(QTextEdit):
2626
    def __init__(self, lang, *args):
2727
        QTextEdit.__init__(self, *args)
28-
        self.dict = enchant.Dict(lang)
28+
        try:
29+
            self.dict = enchant.Dict(lang)
30+
        except:
31+
            self.dict = None
2932
        self.highlighter = Highlighter(self.document())
3033
        self.highlighter.setDict(self.dict)
3134