mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
See #1482670 (I receive a fault when adding a word to user dictionary.)
This commit is contained in:
parent
ae73e16909
commit
096895828a
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user