All of lore.kernel.org
 help / color / mirror / Atom feed
* main - lvmdbustest: Use updated pyudev syntax
@ 2022-09-19 15:57 Tony Asleson
  0 siblings, 0 replies; only message in thread
From: Tony Asleson @ 2022-09-19 15:57 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9ffa1ef884f51d08fc6f2b39287a8d566eeed7df
Commit:        9ffa1ef884f51d08fc6f2b39287a8d566eeed7df
Parent:        0887896847807e159a70edc5ac92a4030c13923a
Author:        Tony Asleson <tasleson@redhat.com>
AuthorDate:    Mon Aug 8 10:02:37 2022 -0500
Committer:     Tony Asleson <tasleson@redhat.com>
CommitterDate: Fri Sep 16 10:49:36 2022 -0500

lvmdbustest: Use updated pyudev syntax

Previous syntax has been deprecated.
---
 test/dbus/lvmdbustest.py | 4 ++--
 1 file 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()
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-19 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 15:57 main - lvmdbustest: Use updated pyudev syntax Tony Asleson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.