Re: [PATCH] Modify blends_prospective_gatherer.py : Raise IntegrityError in case of duplicate keys in table blends_prospectivepackages
- To: debian-blends@lists.debian.org
- Subject: Re: [PATCH] Modify blends_prospective_gatherer.py : Raise IntegrityError in case of duplicate keys in table blends_prospectivepackages
- From: Andreas Tille <andreas@an3as.eu>
- Date: Tue, 22 Sep 2015 12:18:28 +0200
- Message-id: <[🔎] 20150922101828.GE20451@an3as.eu>
- In-reply-to: <1440439066-24451-1-git-send-email-akshita-guest@users.alioth.debian.org>
- References: <1440439066-24451-1-git-send-email-akshita-guest@users.alioth.debian.org>
I droped this patch in favour of the next one.
On Mon, Aug 24, 2015 at 11:27:46PM +0530, zenith158@gmail.com wrote:
> 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
>
>
--
http://fam-tille.de
Reply to: