Skip to content

Commit 71f54cc

Browse files
authored
Update Neousys available configs detection (#1744)
The modification ensures that the Neousys interface's method '_detect_available_configs' function checks if NEOUSYS_CANLIB is None. If it's None, no configuration is returned, and if it's not, the usual configuration with the interface as 'neousys' and channel as 0 is returned. This provides an additional layer of error handling.
1 parent ffb14a3 commit 71f54cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

can/interfaces/neousys/neousys.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,8 @@ def shutdown(self):
239239

240240
@staticmethod
241241
def _detect_available_configs():
242-
# There is only one channel
243-
return [{"interface": "neousys", "channel": 0}]
242+
if NEOUSYS_CANLIB is None:
243+
return []
244+
else:
245+
# There is only one channel
246+
return [{"interface": "neousys", "channel": 0}]

0 commit comments

Comments
 (0)