mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 09:21:37 +00:00
More explicit error message for a missing wordlist
This commit is contained in:
parent
2ecf31ee81
commit
65811d587e
@ -124,7 +124,8 @@ def get_frequency_list(lang, wordlist='best', match_cutoff=30):
|
||||
best, score = langcodes.best_match(lang, list(available),
|
||||
min_score=match_cutoff)
|
||||
if score == 0:
|
||||
raise LookupError("No wordlist available for language %r" % lang)
|
||||
raise LookupError("No wordlist %r available for language %r"
|
||||
% (wordlist, lang))
|
||||
|
||||
if best != lang:
|
||||
logger.warning(
|
||||
|
Loading…
Reference in New Issue
Block a user