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

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