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

Brian C. Lane bcl at redhat.com
Mon Feb 24 19:58:40 UTC 2014


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)
-- 
1.8.5.3



More information about the anaconda-patches mailing list