[Yum-devel] [Patch] Catch sqlite exceptions and convert them to YumBaseError
seth vidal
skvidal at fedoraproject.org
Thu Dec 6 14:46:54 UTC 2007
On Thu, 2007-12-06 at 11:37 +0100, Florian Festi wrote:
> seth vidal wrote:
> > On Wed, 2007-12-05 at 11:03 +0100, Florian Festi wrote:
> >> Possible solution for https://bugzilla.redhat.com/show_bug.cgi?id=403371
> >>
> >> Comments?
> >>
> >
> > decorators fill me with bile. I realize it causes fewer lines of code,
> > it just feels wrong to me.
> I cannot pretend that this reaction is unexpected...
>
> My point is that the alternatives are not that much more adorable:
>
> 1. Ignore the problem
> 2. Add 20 try/except blocks
> 3. Push the exception transition down to sqlutils.executeSQL (wrong level of
> abstracction but IMHO the least painful alternative) and add try/exept for
> what's left.
Yah, this I also know. Visceral reaction to ugliness is what I get
whenever I see decorators. Commit the patch with the change mentioned
below. Your usage of decorators isn't bad I just dislike them.
> > Also - swap the YumBaseError for either RepoError or some new error so
> > we have better specificity but can catch it with YumBaseError
> > generically.
> Valid point, I was just unsure which one to pick.
>
-sv
More information about the Yum-devel
mailing list