diff --git a/patacrep/songs/__init__.py b/patacrep/songs/__init__.py index 7830f5c4..dcea0e27 100644 --- a/patacrep/songs/__init__.py +++ b/patacrep/songs/__init__.py @@ -27,8 +27,8 @@ def lang2language(lang): try: return BABEL_LANGUAGES[lang] except KeyError: - # TODO: raise a nice error - print('Unknown lang:' + lang) + available = ", ".join(BABEL_LANGUAGES.keys()) + LOGGER.error('Unknown lang code: ' + lang + '. Supported: ' + available) return 'english' def cached_name(datadir, filename):