[blivet:rhel7/master 4/4] Change messages to SanityError objects (#1060255)

Chris Lumens clumens at redhat.com
Fri Feb 7 19:28:17 UTC 2014


> 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


More information about the anaconda-patches mailing list