aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-10 11:06:26 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-10 11:06:26 +0200
commit8c900e8ebbca769bde21f77e1c3f86f30094df79 (patch)
tree57304d4af1046ad98e63deb47c38ac99fb0dbb9e /src/web
parentfix (diff)
downloadnewspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.tar.gz
newspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.tar.bz2
newspipe-8c900e8ebbca769bde21f77e1c3f86f30094df79.zip
try to fix
Diffstat (limited to 'src/web')
-rw-r--r--src/web/views/__init__.py5
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'
bgstack15