From e7d59aa6487194be8d9d59bd152afb2e2c754b18 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Fri, 16 May 2014 18:10:48 +0200 Subject: [PATCH] verbose error --- dtc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dtc.py b/dtc.py index d9cd465..ae83166 100755 --- a/dtc.py +++ b/dtc.py @@ -59,7 +59,10 @@ if __name__ == "__main__": last = last_inserted() for q in l: if q["id"] > last: - insert(q) + try: + insert(q) + except psycopg2.IntegrityError: + print "Bim. l,last_inserted = %s" % (l, last_inserted) else: id = int(sys.argv[1]) try: -- 2.39.2