bda387
From 5097a0f3fba2960fc77cfd6ceb828287f60c930c Mon Sep 17 00:00:00 2001
bda387
From: Vojtech Trefny <vtrefny@redhat.com>
bda387
Date: Thu, 6 Dec 2018 10:32:58 +0100
bda387
Subject: [PATCH] Fix reading LV attributes in LVMVolumeGroupDevice.status
bda387
bda387
This was not adjusted to libblockdev API when cherry-picking fixes
bda387
from rhel7-branch in 3c8f8dbf78b0a093e120f69241b44a48ff07be30
bda387
---
bda387
 blivet/devices/lvm.py | 7 +++----
bda387
 1 file changed, 3 insertions(+), 4 deletions(-)
bda387
bda387
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
bda387
index 7835b7e8..8c4ee2ba 100644
bda387
--- a/blivet/devices/lvm.py
bda387
+++ b/blivet/devices/lvm.py
bda387
@@ -222,11 +222,10 @@ def status(self):
bda387
             try:
bda387
                 lvs_info = blockdev.lvm.lvs(vg_name=self.name)
bda387
             except blockdev.LVMError:
bda387
-                lvs_info = dict()
bda387
+                lvs_info = []
bda387
 
bda387
-            for lv_info in lvs_info.values():
bda387
-                lv_attr = udev.device_get_lv_attr(lv_info)
bda387
-                if lv_attr and lv_attr[4] == 'a':
bda387
+            for lv_info in lvs_info:
bda387
+                if lv_info.attr and lv_info.attr[4] == 'a':
bda387
                     return True
bda387
 
bda387
             return False