1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-04 20:30:11 +01:00

Merge pull request #1124 from JosephKiranBabu/python3-unicode-support

Make Python 3 able to read settings files with Unicode characters
This commit is contained in:
Adam Tauber 2018-01-12 10:58:23 +01:00 committed by GitHub
commit 8511e64f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ if not settings_path:
raise Exception('settings.yml not found') raise Exception('settings.yml not found')
# load settings # load settings
with open(settings_path) as settings_yaml: with open(settings_path, 'rb') as settings_yaml:
settings = load(settings_yaml) settings = load(settings_yaml)
''' '''

View File

@ -36,7 +36,7 @@ engines = {}
categories = {'general': []} categories = {'general': []}
languages = loads(open(engine_dir + '/../data/engines_languages.json').read()) languages = loads(open(engine_dir + '/../data/engines_languages.json', 'rb').read())
engine_shortcuts = {} engine_shortcuts = {}
engine_default_args = {'paging': False, engine_default_args = {'paging': False,

View File

@ -94,7 +94,7 @@ def load():
global db global db
current_dir = os.path.dirname(os.path.realpath(__file__)) current_dir = os.path.dirname(os.path.realpath(__file__))
json_data = open(current_dir + "/../data/currencies.json").read() json_data = open(current_dir + "/../data/currencies.json", 'rb').read()
db = json.loads(json_data) db = json.loads(json_data)