From 096895828a7baeff783432141e28ace4a8912fa8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 7 Aug 2015 20:50:12 +0530 Subject: [PATCH] See #1482670 (I receive a fault when adding a word to user dictionary.) --- src/calibre/spell/dictionary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/spell/dictionary.py b/src/calibre/spell/dictionary.py index fd2720d915..2b9eaa4523 100644 --- a/src/calibre/spell/dictionary.py +++ b/src/calibre/spell/dictionary.py @@ -243,7 +243,7 @@ class Dictionaries(object): def add_user_words(self, words, langcode): for d in self.dictionaries.itervalues(): - if d.primary_locale.langcode == langcode: + if getattr(d.primary_locale, 'langcode', None) == langcode: for word in words: d.obj.add(word)