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/__init__.py | |
parent | 8511e64f350b4b31db314a5d74ef77dd5b97b5f3 (diff) | |
parent | 829032f306cec8f6d109bfb037a01dc50ff87442 (diff) | |
download | searxng-4ad5e6ad4f1e5ce89eb7d1135ada712fdd9ce6b6.tar.gz searxng-4ad5e6ad4f1e5ce89eb7d1135ada712fdd9ce6b6.zip |
Merge pull request #1148 from MarcAbonce/python3.5-fix
[fix] Read utf-8 files (settings, languages, currency) with Python3.5
Diffstat (limited to 'searx/__init__.py')
-rw-r--r-- | searx/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/__init__.py b/searx/__init__.py index d277570bb..b1010f25f 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -19,6 +19,7 @@ import certifi import logging from os import environ from os.path import realpath, dirname, join, abspath, isfile +from io import open from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION try: from yaml import load @@ -50,7 +51,7 @@ if not settings_path: raise Exception('settings.yml not found') # load settings -with open(settings_path, 'rb') as settings_yaml: +with open(settings_path, 'r', encoding='utf-8') as settings_yaml: settings = load(settings_yaml) ''' |