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