[master 6/7] Make VG determination in Blivet.newLV() less cryptic
vpodzime
installerbot-noreply at redhat.com
Fri Jul 31 11:33:58 UTC 2015
From: Vratislav Podzimek <vpodzime at redhat.com>
The new LV's parent may be a VG or a thin pool depending on the type of the new
LV. Let's call this object 'parent' instead of 'vg' which is way less confusing.
---
blivet/blivet.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/blivet/blivet.py b/blivet/blivet.py
index d27e072..bde644b 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -917,10 +917,12 @@ def newLV(self, *args, **kwargs):
"""
thin_volume = kwargs.pop("thin_volume", False)
thin_pool = kwargs.pop("thin_pool", False)
- vg = kwargs.get("parents", [None])[0]
- if thin_volume and vg:
+ parent = kwargs.get("parents", [None])[0]
+ if thin_volume and parent:
# kwargs["parents"] will contain the pool device, so...
- vg = vg.vg
+ vg = parent.vg
+ else:
+ vg = parent
mountpoint = kwargs.pop("mountpoint", None)
if 'fmt_type' in kwargs:
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/fedcf4b808fbd99878c366f3e75c793eea7b7f8f
More information about the anaconda-patches
mailing list