mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix] read utf-8 files (settings, languages, currency) with python3.5
Related to discussion in #1124 The io.open import is necessary for python2
This commit is contained in:
parent
5947c05649
commit
829032f306
3 changed files with 6 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue