Browse Source

Exeption was never raised

pull/136/head
Louis 9 years ago
parent
commit
b2b80ef172
  1. 3
      patacrep/latex/__init__.py

3
patacrep/latex/__init__.py

@ -79,7 +79,6 @@ BABEL_LANGUAGES = OrderedDict((
def lang2babel(lang):
"""Return the language used by babel, corresponding to the language code"""
try:
# Exact match
if lang.lower() in BABEL_LANGUAGES:
return BABEL_LANGUAGES[lang.lower()]
@ -98,7 +97,7 @@ def lang2babel(lang):
)
)
return BABEL_LANGUAGES[babel]
except KeyError:
# Error: no (exact or approximate) match found
available = ", ".join(BABEL_LANGUAGES.keys())
LOGGER.error(
"Unknown language code '{}' (supported: {}). Using default 'english' instead.".format(

Loading…
Cancel
Save