mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [translate] fix exception
This commit is contained in:
parent
1c52c187ad
commit
5b808ed416
1 changed files with 4 additions and 3 deletions
|
@ -269,8 +269,8 @@ class LanguageTranslator:
|
|||
try:
|
||||
for dict_lang in self.lt.languages():
|
||||
languages.append({'iso': dict_lang['code'], 'language': dict_lang['name']})
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return languages
|
||||
|
||||
def detect_cld3(self, content):
|
||||
|
@ -315,7 +315,8 @@ class LanguageTranslator:
|
|||
|
||||
try:
|
||||
LIST_LANGUAGES = LanguageTranslator().languages()
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
print(e)
|
||||
LIST_LANGUAGES = []
|
||||
|
||||
def get_translation_languages():
|
||||
|
|
Loading…
Reference in a new issue