From 2332f10d9c9003c50e89e5fd5031c7a9d1fbdb19 Mon Sep 17 00:00:00 2001 From: Yaron Yogev Date: Thu, 3 Aug 2017 15:16:19 +0300 Subject: remove unused method run_query(), formerly exec() Change-Id: I680c652f3ce002b1d7be3401127e2e8c100b9e28 Signed-off-by: Yaron Yogev --- app/discover/fetchers/db/db_access.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app/discover/fetchers/db/db_access.py') diff --git a/app/discover/fetchers/db/db_access.py b/app/discover/fetchers/db/db_access.py index 8d21bdd..0174c4b 100644 --- a/app/discover/fetchers/db/db_access.py +++ b/app/discover/fetchers/db/db_access.py @@ -117,19 +117,3 @@ class DbAccess(Fetcher): } return jsonify(ret) - def run_query(self, query, table, field, values): - try: - cursor = DbAccess.conn.cursor(dictionary=True) - cursor.execute(query, [table, field, values]) - except (AttributeError, mysql.connector.errors.OperationalError) as e: - self.log.error(e) - self.connect_to_db(True) - # try again to run the query - cursor = DbAccess.conn.cursor(dictionary=True) - cursor.execute(query, [table, field, values]) - - rows = [] - for row in cursor: - rows.append(row) - return rows - -- cgit 1.2.3-korg