]> gitweb.pimeys.fr Git - dtc.git/commitdiff
verbose error
authorVincent Le Gallic <legallic@crans.org>
Fri, 16 May 2014 16:10:48 +0000 (18:10 +0200)
committerVincent Le Gallic <legallic@crans.org>
Fri, 16 May 2014 16:10:48 +0000 (18:10 +0200)
dtc.py

diff --git a/dtc.py b/dtc.py
index d9cd465c5c5ff2dd41af5e46c23c810671b4af4a..ae8316614fdf10446d49a8f652c068e7499a5431 100755 (executable)
--- 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: