10000 Update Neousys available configs detection · hardbyte/python-can@4e2bb4b · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e2bb4b

Browse files
committed
Update Neousys available configs detection
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 d40915c commit 4e2bb4b

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)
0