Merge pull request #793 from yarda/rhel97087
udev: fix possible traceback in device matcher
This commit is contained in:
commit
c0af15b9aa
1 changed files with 4 additions and 1 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue