diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2018-01-17 22:05:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-17 22:05:08 +0100 |
| commit | 4ad5e6ad4f1e5ce89eb7d1135ada712fdd9ce6b6 (patch) | |
| tree | 38b9bbabbdfc6a343be30ccdc519643ee6fccdc3 /searx/engines/__init__.py | |
| parent | 8511e64f350b4b31db314a5d74ef77dd5b97b5f3 (diff) | |
| parent | 829032f306cec8f6d109bfb037a01dc50ff87442 (diff) | |
Merge pull request #1148 from MarcAbonce/python3.5-fix
[fix] Read utf-8 files (settings, languages, currency) with Python3.5
Diffstat (limited to 'searx/engines/__init__.py')
| -rw-r--r-- | searx/engines/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index bec8de3a8..b4479157b 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -19,6 +19,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. import sys import threading from os.path import realpath, dirname +from io import open from flask_babel import gettext from operator import itemgetter from json import loads @@ -36,7 +37,7 @@ engines = {} categories = {'general': []} -languages = loads(open(engine_dir + '/../data/engines_languages.json', 'rb').read()) +languages = loads(open(engine_dir + '/../data/engines_languages.json', 'r', encoding='utf-8').read()) engine_shortcuts = {} engine_default_args = {'paging': False, |