fix after rebase

This commit is contained in:
Noémi Ványi 2019-01-07 21:28:58 +01:00
parent b63d645a52
commit 97351a2c72
2 changed files with 1 additions and 4 deletions

View file

@ -32,7 +32,7 @@ supported_languages_url = 'https://meta.wikimedia.org/wiki/List_of_Wikipedias'
# set language in base_url
def url_lang(lang):
lang_pre = lang.split('-')[0]
if lang_pre == 'all' or lang_pre not in supported_languages:
if lang_pre == 'all' or lang_pre not in supported_languages and lang_pre not in language_aliases:
return 'en'
return match_language(lang, supported_languages, language_aliases).split('-')[0]