Skip to content

Commit

Permalink
resource/udev: mark devices from match_subsystem as available
Browse files Browse the repository at this point in the history
For devices received from match_subsystem, the action attribute is None,
so we need to handle those the same as 'add'.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
  • Loading branch information
jluebbe committed Feb 20, 2017
1 parent 67a4a40 commit 57c7ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion labgrid/resource/udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __attrs_post_init__(self):

def on_device_set(self):
self.port = self.device.device_node
self.avail = self.device.action in ['add', 'change']
self.avail = self.device.action in [None, 'add', 'change']

@target_factory.reg_resource
@attr.s
Expand Down

0 comments on commit 57c7ccd

Please sign in to comment.