[master][PATCH] Consider errno 5 I/O errors hardware faults

Martin Kolman mkolman at redhat.com
Thu Oct 10 09:40:08 UTC 2013


On Wed, 2013-10-09 at 10:37 -0400, David Shea wrote:
> On 10/09/2013 10:29 AM, Vratislav Podzimek wrote:
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> >   pyanaconda/exception.py | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
> > index a176270..194e1b4 100644
> > --- a/pyanaconda/exception.py
> > +++ b/pyanaconda/exception.py
> > @@ -82,7 +82,9 @@ class AnacondaExceptionHandler(ExceptionHandler):
> >           ty = dump_info.exc_info.type
> >           value = dump_info.exc_info.value
> >   
> > -        if issubclass(ty, blivet.errors.StorageError) and value.hardware_fault:
> > +        if (issubclass(ty, blivet.errors.StorageError) and value.hardware_fault) \
> > +                or (issubclass(ty, OSError) and value.errno == 5):
> > +            # hardware fault or '[Errno 5] Input/Output error'
> >               hw_error_msg = _("The installation was stopped due to what "
> >                                "seems to be a problem with your hardware. "
> >                                "The exact error message is:\n\n%s.\n\n "
> Using errno.EIO would make it more clear what's going on
+1

Also otherwise looks good to me, ACK.
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches




More information about the anaconda-patches mailing list