neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone

Blame SOURCES/0013-Fix-getting-PV-info-in-LVMPhysicalVolume-from-the-ca.patch

2a10b1
From a15c65a5e71f6fd53624bd657ab95b38d37c6f1b Mon Sep 17 00:00:00 2001
2a10b1
From: Vojtech Trefny <vtrefny@redhat.com>
2a10b1
Date: Mon, 16 Aug 2021 09:50:34 +0200
2a10b1
Subject: [PATCH] Fix getting PV info in LVMPhysicalVolume from the cache
2a10b1
2a10b1
"self.device" is string for formats so accessing "self.device.path"
2a10b1
results in an AttributeError.
2a10b1
2a10b1
Resolves: rhbz#2079220
2a10b1
---
2a10b1
 blivet/formats/lvmpv.py | 2 +-
2a10b1
 1 file changed, 1 insertion(+), 1 deletion(-)
2a10b1
2a10b1
diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py
2a10b1
index e4182adb..8cfade9f 100644
2a10b1
--- a/blivet/formats/lvmpv.py
2a10b1
+++ b/blivet/formats/lvmpv.py
2a10b1
@@ -170,7 +170,7 @@ class LVMPhysicalVolume(DeviceFormat):
2a10b1
             if self.exists:
2a10b1
                 # we don't have any actual value, but the PV exists and is
2a10b1
                 # active, we should try to determine it
2a10b1
-                pv_info = pvs_info.cache.get(self.device.path)
2a10b1
+                pv_info = pvs_info.cache.get(self.device)
2a10b1
                 if pv_info is None:
2a10b1
                     log.error("Failed to get free space information for the PV '%s'", self.device)
2a10b1
                     self._free = Size(0)
2a10b1
-- 
2a10b1
2.35.3
2a10b1