diff --git a/searx/engines/mysql_server.py b/searx/engines/mysql_server.py index e65217bb..70c7e26e 100644 --- a/searx/engines/mysql_server.py +++ b/searx/engines/mysql_server.py @@ -3,6 +3,10 @@ MySQL database (Offline) """ +# error is ignored because the admin has to +# install it manually to use the engine +# pylint: disable=import-error + import mysql.connector @@ -49,7 +53,7 @@ def search(query, params): def _fetch_results(cur): results = [] for res in cur: - result = dict(zip(cur.column_names, map(str, res))), + result = dict(zip(cur.column_names, map(str, res))) result['template'] = result_template results.append(result) diff --git a/searx/engines/postgresql.py b/searx/engines/postgresql.py index e49a01d2..2c95f415 100644 --- a/searx/engines/postgresql.py +++ b/searx/engines/postgresql.py @@ -3,6 +3,10 @@ PostgreSQL database (Offline) """ +# error is ignored because the admin has to +# install it manually to use the engine +# pylint: disable=import-error + import psycopg2 engine_type = 'offline' @@ -41,7 +45,7 @@ def search(query, params): with _connection: with _connection.cursor() as cur: - cur.execute(query_str, query_params) + cur.execute(query_to_run, query_params) return _fetch_results(cur)