Skip to content

Commit e5b5425

Browse files
committed
util/agents/usb_hid_relay: Fix agent errors
* get_output() should return some result; * should attach kernel driver back in the destructor otherwise HIDRAW device will not appear if it has existed. Signed-off-by: Roman Kuznecov <zubastikiko@gmail.com>
1 parent c609d2d commit e5b5425

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

labgrid/util/agents/usb_hid_relay.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ def set_output(self, number, status):
100100

101101
def get_output(self, number):
102102
with self._claimed():
103-
self._get_output(number)
103+
return self._get_output(number)
104+
105+
def __del__(self):
106+
self._dev.attach_kernel_driver(0)
104107

105108

106109
_relays = {}

0 commit comments

Comments
 (0)