Fixed bug in loading of dictionary without enchant installed

This commit is contained in:
Veronica K. B. Olsen
2020-04-22 10:15:58 +02:00
parent dbeabdc087
commit 4b99cad20d
+7 -1
View File
@@ -26,13 +26,19 @@
""" """
import logging import logging
import enchant
import nw import nw
try:
import enchant
except:
# No need to do anything
# setLanguage will fall back to dummy dictionary
pass
from nw.tools.spellcheck import NWSpellCheck from nw.tools.spellcheck import NWSpellCheck
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class NWSpellEnchant(NWSpellCheck): class NWSpellEnchant(NWSpellCheck):
def __init__(self): def __init__(self):