aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorYaron Yogev <yaronyogev@gmail.com>2017-08-03 15:16:19 +0300
committerYaron Yogev <yaronyogev@gmail.com>2017-08-03 15:16:19 +0300
commit2332f10d9c9003c50e89e5fd5031c7a9d1fbdb19 (patch)
tree96c74cd049dcbc3a234f576a45cb2318a30b21fd /app
parent1e8890209856ce68f4f0a6fd43b11a2aab8f8484 (diff)
remove unused method run_query(), formerly exec()
Change-Id: I680c652f3ce002b1d7be3401127e2e8c100b9e28 Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/discover/fetchers/db/db_access.py16
1 files changed, 0 insertions, 16 deletions
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
-