Skip to content

Commit

Permalink
Allow the backend to use the default channel if it is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauszus committed Jul 24, 2018
1 parent 9e56f33 commit d841c98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion can/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ def __new__(cls, channel=None, *args, **config):
channel = config['channel']
del config['channel']

return cls(channel, *args, **config)
if not channel:
# Use the default channel for the backend
return cls(*args, **config)
else:
return cls(channel, *args, **config)


def detect_available_configs(interfaces=None):
Expand Down

0 comments on commit d841c98

Please sign in to comment.