----- Original Message -----
From: "Chris Lumens" <clumens(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Friday, February 7, 2014 2:28:17 PM
Subject: Re: [blivet:rhel7/master 4/4] Change messages to SanityError objects (#1060255)
> Related: rhbz#1060255
>
> Change string messages returned in sanityCheck tuple and in
> _verifyLUKSDevicesHaveKey to Error objects.
> The major purpose of this is to be able to distinguish and filter them.
>
> Also, got rid of that large chunk of commented out code, if we want it, we
> know where to find it.
If you're going to make the messages into objects, you could also give
the objects a type to differentiate warnings from errors. Or perhaps
better, define a base warning and a base error exception that inherit
from your base exception. Then sanityCheck doesn't have to return a
tuple (which I've always disliked) and instead just returns a single
list.
- Chris
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
I think the main problem that I saw with that is that if sanityCheck changes its mind
about what is an error and what is warning you have to shuffle the class hierarchy
around.
I'll reconsider it, though, I don't particularly like that pair either.
- mulhern