[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Modify blends_prospective_gatherer.py : Raise IntegrityError in case of duplicate keys in table blends_prospectivepackages



From: Akshita Jha <akshita-guest@users.alioth.debian.org>

---
 udd/blends_prospective_gatherer.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/udd/blends_prospective_gatherer.py b/udd/blends_prospective_gatherer.py
index 69652e8..7a7f89f 100644
--- a/udd/blends_prospective_gatherer.py
+++ b/udd/blends_prospective_gatherer.py
@@ -422,6 +422,9 @@ class blends_prospective_gatherer(gatherer):
     except KeyError, err:
       print "Error while inserting packages", err
       raise
+    except IntegrityError as err:
+      print "Duplicate Key Error while inserting packages", err
+      raise
 
     cur.execute("DEALLOCATE package_insert")
     
-- 
1.9.1


Reply to: