mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Ignore harmless error when importing words to the dictionary
This commit is contained in:
parent
d1b517357e
commit
b51bb174db
@ -255,7 +255,10 @@ class Dictionaries(object):
|
|||||||
ud.words.add((word, locale.langcode))
|
ud.words.add((word, locale.langcode))
|
||||||
if len(ud.words) > wl:
|
if len(ud.words) > wl:
|
||||||
self.save_user_dictionaries()
|
self.save_user_dictionaries()
|
||||||
|
try:
|
||||||
self.word_cache.pop((word, locale), None)
|
self.word_cache.pop((word, locale), None)
|
||||||
|
except TypeError:
|
||||||
|
pass # word is a set, ignore
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user