From 65811d587e313222927f92aa269c0a545ff3319f Mon Sep 17 00:00:00 2001 From: Robyn Speer Date: Wed, 14 Mar 2018 15:10:27 -0400 Subject: [PATCH] More explicit error message for a missing wordlist --- wordfreq/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wordfreq/__init__.py b/wordfreq/__init__.py index 9fd8c39..1c41998 100644 --- a/wordfreq/__init__.py +++ b/wordfreq/__init__.py @@ -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(