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

David Shea dshea at redhat.com
Wed Oct 9 14:37:18 UTC 2013


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


More information about the anaconda-patches mailing list