1
0
Fork 0

Merge pull request #793 from yarda/rhel97087

udev: fix possible traceback in device matcher
This commit is contained in:
Jaroslav Škarvada 2025-07-28 17:26:36 +02:00 committed by GitHub
commit c0af15b9aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,10 @@ class DeviceMatcherUdev(device_matcher.DeviceMatcher):
try:
items = device.properties.items()
except AttributeError:
items = device.items()
try:
items = device.items()
except AttributeError:
return False
for key, val in sorted(list(items)):
properties += key + '=' + val + '\n'