aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/translations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/translations.py')
-rw-r--r--src/hydrilla/translations.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hydrilla/translations.py b/src/hydrilla/translations.py
index a963e82..84c565a 100644
--- a/src/hydrilla/translations.py
+++ b/src/hydrilla/translations.py
@@ -57,10 +57,12 @@ def select_best_locale() -> str:
use_flask = False
if use_flask:
- return flask.request.accept_languages.best_match(
+ best = flask.request.accept_languages.best_match(
supported_locales,
default=default_locale
)
+ assert best is not None
+ return best
# https://stackoverflow.com/questions/3425294/how-to-detect-the-os-default-language-in-python
# I am not going to surrender to Microbugs' nonfree, crappy OS to test it,