[f22-branch 3/5] Catch DeviceError as well as ValueError (#1208536)

mulkieran installerbot-noreply at redhat.com
Mon Apr 6 20:34:18 UTC 2015


From: mulhern <amulhern at redhat.com>

Related: fed#1208536

Since MDRaidArrayDevice constructor can raise DeviceError as well,
and we don't want failure of the array creation to be fatal.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index fc026b0..6676eaa 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1648,7 +1648,7 @@ def handleUdevMDMemberFormat(self, info, device):
                    metadataVersion=md_metadata,
                    exists=True
                 )
-            except ValueError as e:
+            except (ValueError, DeviceError) as e:
                 log.error("failed to create md array: %s", e)
                 return
 


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/4c796742197c963947b66292fa94881342f0cf40


More information about the anaconda-patches mailing list