]> sourceware.org Git - lvm2.git/commitdiff
lvmdbustest: Use updated pyudev syntax
authorTony Asleson <tasleson@redhat.com>
Mon, 8 Aug 2022 15:02:37 +0000 (10:02 -0500)
committerTony Asleson <tasleson@redhat.com>
Fri, 16 Sep 2022 15:49:36 +0000 (10:49 -0500)
Previous syntax has been deprecated.

test/dbus/lvmdbustest.py

index e6f6d489122f347e7d4637e5c93d35f79df4c6ad..aadd036b0f33bbf6f4e600d1de80780214172d4d 100755 (executable)
@@ -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()
 
This page took 0.038086 seconds and 5 git commands to generate.