diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-10-10 11:06:26 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-10-10 11:06:26 +0200 |
commit | 8c900e8ebbca769bde21f77e1c3f86f30094df79 (patch) | |
tree | 57304d4af1046ad98e63deb47c38ac99fb0dbb9e /src/web/views | |
parent | fix (diff) | |
download | newspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.tar.gz newspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.tar.bz2 newspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.zip |
try to fix
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/views/__init__.py b/src/web/views/__init__.py index e0e49927..10b5cf54 100644 --- a/src/web/views/__init__.py +++ b/src/web/views/__init__.py @@ -19,4 +19,7 @@ from flask import g @g.babel.localeselector def get_locale(): - return request.accept_languages.best_match(conf.LANGUAGES.keys()) + try: + return request.accept_languages.best_match(conf.LANGUAGES.keys()) + except: + return 'en' |