1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvmdbustest: Check for self.pvs

If we don't make it through setUp, self.pvs will not exist.
This commit is contained in:
Tony Asleson 2022-09-08 15:29:55 -05:00
parent ead80d134d
commit a326e35cda

View File

@ -454,7 +454,7 @@ class TestDbusService(unittest.TestCase):
# Check to make sure the PVs we had to start exist, else re-create
# them
self.objs, self.bus = get_objects()
if len(self.pvs) != len(self.objs[PV_INT]):
if hasattr(self, "pvs") and len(self.pvs) != len(self.objs[PV_INT]):
for p in self.pvs:
found = False
for pc in self.objs[PV_INT]: