[blivet][master/rhel7-branch] Fix a traceback with anaconda-cleanup on s390x. (#1173101)

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Jun 15 22:17:25 UTC 2015


Devicetree reset crashed on s390x when calling anaconda-cleanup
because the dasd attribute was never created or properly set.

Resolves: rhbz#1173101
---
 blivet/__init__.py   | 1 +
 blivet/devicetree.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 3b28ad9..808fd92 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -285,6 +285,7 @@ class StorageDiscoveryConfig(object):
         self.protectedDevSpecs = []
         self.diskImages = {}
         self.zeroMbr = False
+        self.dasd = []
 
         # Whether clearPartitions removes scheduled/non-existent devices and
         # disklabels depends on this flag.
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 9f1aa9e..43a1805 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -116,7 +116,7 @@ class DeviceTree(object):
         self.exclusiveDisks = getattr(conf, "exclusiveDisks", [])
         self.ignoredDisks = getattr(conf, "ignoredDisks", [])
         self.iscsi = iscsi
-        self.dasd = dasd
+        self.dasd = dasd = getattr(conf, "dasd", dasd)
 
         self.diskImages = {}
         images = getattr(conf, "diskImages", {})
-- 
1.9.3



More information about the anaconda-patches mailing list