fix: dev: python3 dict keys jsonify

This commit is contained in:
rachmadaniHaryono 2019-05-18 00:03:49 +08:00
parent a84caa22cf
commit 535fff109f
1 changed files with 2 additions and 2 deletions

View File

@ -846,7 +846,7 @@ def clear_cookies():
@app.route('/config') @app.route('/config')
def config(): def config():
return jsonify({'categories': categories.keys(), return jsonify({'categories': list(categories.keys()),
'engines': [{'name': engine_name, 'engines': [{'name': engine_name,
'categories': engine.categories, 'categories': engine.categories,
'shortcut': engine.shortcut, 'shortcut': engine.shortcut,
@ -854,7 +854,7 @@ def config():
'paging': engine.paging, 'paging': engine.paging,
'language_support': engine.language_support, 'language_support': engine.language_support,
'supported_languages': 'supported_languages':
engine.supported_languages.keys() list(engine.supported_languages.keys())
if isinstance(engine.supported_languages, dict) if isinstance(engine.supported_languages, dict)
else engine.supported_languages, else engine.supported_languages,
'safesearch': engine.safesearch, 'safesearch': engine.safesearch,