[blivet:all][PATCH] Don't try to get no profile's name (#1151458)
Vratislav Podzimek
vpodzime at redhat.com
Tue Oct 21 07:45:48 UTC 2014
If no profile is specified, trying to get its name results in a traceback.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
blivet/devices.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 56f8dcc..75afcc2 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -3584,10 +3584,15 @@ class LVMThinPoolDevice(LVMLogicalVolumeDevice):
""" Create the device. """
log_method_call(self, self.name, status=self.status)
# TODO: chunk size, data/metadata split --> profile
+ if self.profile:
+ profile_name = self.profile.name
+ else:
+ profile_name = ""
+
lvm.thinpoolcreate(self.vg.name, self.lvname, self.size,
metadatasize=self.metaDataSize,
chunksize=self.chunkSize,
- profile=self.profile.name)
+ profile=profile_name)
def dracutSetupArgs(self):
return set()
--
1.9.3
More information about the anaconda-patches
mailing list