Skip to content

Commit 0435e17

Browse files
committed
Add bus configuration info
1 parent 52703d7 commit 0435e17

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

can/bridge.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
Example usage:
3333
can_bridge -i socketcan -c can0 -- -i socketcan can1
3434
can_bridge -vvv -- -i socketcan -c can0 -- -i socketcan can1
35+
36+
Type `can_bridge help_bus` for information about single bus configuration.
3537
"""
3638

3739
LOG = logging.getLogger(__name__)
@@ -106,8 +108,11 @@ def main() -> None:
106108
try:
107109
general, conf_a, conf_b = split_configurations(args)
108110
except UserError as exc:
109-
print(f"Error while processing arguments: {exc}",
110-
file=sys.stderr)
111+
if len(args) == 1 and args[0] == 'help_bus':
112+
bus_parser.print_help(sys.stderr)
113+
else:
114+
print(f"Error while processing arguments: {exc}",
115+
file=sys.stderr)
111116
raise SystemExit(errno.EINVAL)
112117

113118
LOG.debug("General configuration: %s", general)

0 commit comments

Comments
 (0)