Skip to content

Commit eb9640f

Browse files
committed
Allow the backend to use the default channel if it is not given
1 parent 9e56f33 commit eb9640f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

can/interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def __new__(cls, channel=None, *args, **config):
122122
channel = config['channel']
123123
del config['channel']
124124

125-
return cls(channel, *args, **config)
125+
if channel is None:
126+
# Use the default channel for the backend
127+
return cls(*args, **config)
128+
else:
129+
return cls(channel, *args, **config)
126130

127131

128132
def detect_available_configs(interfaces=None):

0 commit comments

Comments
 (0)