From: "Brian C. Lane" <bcl(a)redhat.com>
Some systems are slow to bring up their devices, it is possible to enter
the DUD UI before they are available. blkid returns a 2 when there is
nothing to output so we need to catch CalledProcessError to give them
the chance to refresh a few times until they show up.
Resolves: rhbz#1262963
---
dracut/driver_updates.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dracut/driver_updates.py b/dracut/driver_updates.py
index de18805..b383ea1 100755
--- a/dracut/driver_updates.py
+++ b/dracut/driver_updates.py
@@ -399,10 +399,13 @@ def shortdev(self):
return dev
def blkid():
- out = subprocess.check_output("blkid -o export -s UUID -s TYPE".split())
- out = out.decode('ascii')
- return [dict(kv.split('=',1) for kv in block.splitlines())
- for block in out.split('\n\n')]
+ try:
+ out = subprocess.check_output("blkid -o export -s UUID -s
TYPE".split())
+ out = out.decode('ascii')
+ return [dict(kv.split('=',1) for kv in block.splitlines())
+ for block in out.split('\n\n')]
+ except subprocess.CalledProcessError:
+ return []
# We use this to get disk labels because blkid's encoding of non-printable and
# non-ascii characters is weird and doesn't match what you'd expect to see.
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/f76cf3d7ad029ff3eb3d4993cf...