From: Vincent Le Gallic Date: Fri, 16 May 2014 16:14:00 +0000 (+0200) Subject: Affichage de l'erreur aussi + échec de %s X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;ds=inline;p=dtc.git Affichage de l'erreur aussi + échec de %s --- diff --git a/dtc.py b/dtc.py index ae83166..162e735 100755 --- a/dtc.py +++ b/dtc.py @@ -61,8 +61,8 @@ if __name__ == "__main__": if q["id"] > last: try: insert(q) - except psycopg2.IntegrityError: - print "Bim. l,last_inserted = %s" % (l, last_inserted) + except psycopg2.IntegrityError as err: + print "Bim %s\nl,last_inserted = %s, %s" % (err, l, last_inserted) else: id = int(sys.argv[1]) try: