From 30b685340b762ca566e785cd5e0e8c6e867a86df Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Wed, 18 Feb 2015 00:34:17 +0100 Subject: reproducible: common.py: catch errors in query_db() and print the guilty query --- bin/reproducible_common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index b75d440d..d7340fb2 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -211,7 +211,11 @@ def start_db_connection(): def query_db(query): cursor = conn_db.cursor() - cursor.execute(query) + try: + cursor.execute(query) + except: + print_critical_message('Error execting this query:\n' + query) + raise conn_db.commit() return cursor.fetchall() -- cgit v1.2.3-54-g00ecf