summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-02-18 00:34:17 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-18 12:10:24 +0100
commit30b685340b762ca566e785cd5e0e8c6e867a86df (patch)
treedaa62377b179c2c257920f5248370a08c71cc071 /bin
parent679885d7b4c5e0c60b9ae3f09ea1ef6fc654111b (diff)
downloadjenkins.debian.net-30b685340b762ca566e785cd5e0e8c6e867a86df.tar.xz
reproducible: common.py: catch errors in query_db() and print the guilty query
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.py6
1 files changed, 5 insertions, 1 deletions
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()