Permalink
Browse files

resource/udev: fix child iteration USBSDMuxDevice update function

The function would try to iterate on the NoneType object even if no device was
available. Return from the function early if the device is unavailable.

Fixes: 9ef7746 ("resource/udev: use update function for USBSDMuxDevice")
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
  • Loading branch information...
Emantor committed Nov 22, 2018
1 parent 30c6cb6 commit f248a7bedbac85abf1be800ec95c8f274866553d
Showing with 1 addition and 0 deletions.
  1. +1 −0 labgrid/resource/udev.py
@@ -301,6 +301,7 @@ def update(self):
if not self.device:
self.control_path = None
self.disk_path = None
return
for child in self.device.children:
if child.subsystem == 'block':
self.disk_path = child.device_node

0 comments on commit f248a7b

Please sign in to comment.