summaryrefslogtreecommitdiff
path: root/test/dbus
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2022-08-08 10:02:37 -0500
committerTony Asleson <tasleson@redhat.com>2022-09-16 10:49:36 -0500
commit9ffa1ef884f51d08fc6f2b39287a8d566eeed7df (patch)
tree9dbbf59190bcfdeee72712ade9b517fedad19ad1 /test/dbus
parent0887896847807e159a70edc5ac92a4030c13923a (diff)
downloadlvm2-9ffa1ef884f51d08fc6f2b39287a8d566eeed7df.tar.gz
lvmdbustest: Use updated pyudev syntax
Previous syntax has been deprecated.
Diffstat (limited to 'test/dbus')
-rwxr-xr-xtest/dbus/lvmdbustest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index e6f6d4891..aadd036b0 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1430,7 +1430,7 @@ class TestDbusService(unittest.TestCase):
def test_pv_scan(self):
def major_minor(d):
- return (int(d.properties['MAJOR']), int(d.properties['MINOR']))
+ return (int(d.properties.get('MAJOR')), int(d.properties.get('MINOR')))
devices = TestDbusService._get_devices()
@@ -1439,7 +1439,7 @@ class TestDbusService(unittest.TestCase):
self.assertEqual(self._pv_scan(False, False, [], []), '/')
self._check_consistency()
- block_path = [d.properties['DEVNAME'] for d in devices]
+ block_path = [d.properties.get('DEVNAME') for d in devices]
self.assertEqual(self._pv_scan(False, True, block_path, []), '/')
self._check_consistency()