[master/rhel7] driverdisk: Catch blkid failure (#1036765)

Vratislav Podzimek vpodzime at redhat.com
Tue Feb 25 09:47:11 UTC 2014


On Mon, 2014-02-24 at 11:58 -0800, Brian C. Lane wrote:
> Reportedly blkid will somtimes return a 2, catch the error and exit the
> iso selection.
> 
> Related: rhbz#1036765
> ---
>  dracut/driver-updates | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/dracut/driver-updates b/dracut/driver-updates
> index 47b845e..a744896 100755
> --- a/dracut/driver-updates
> +++ b/dracut/driver-updates
> @@ -647,7 +647,11 @@ def select_iso():
>                    or (None, None) if no ISO file is selected
>          :rtype: (str, str)
>      """
> -    _ret, out = run_cmd(["blkid"])
> +    try:
> +        _ret, out = run_cmd(["blkid"])
> +    except (OSError, RunCmdError):
> +        return (None, None)
> +
>      devices = []
>      for line in out.splitlines():
>          dev = parse_blkid(line)
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list