Commit 1e207b2
helpers/labgrid-raw-interface: make tcpdump count argument actually optional
The intention of labgrid-raw-interface was to have an optional "count"
argument, allowing for packet capture on an interface until a timeout is
reached, no matter how many packets are received. This is used when
calling:
RawNetworkInterfaceDriver.start_record(filename, timeout=10)
However, the missing `nargs="?"` kwarg when adding the argument actually
required the argument to be given:
usage: labgrid-raw-interface tcpdump [-h] [--timeout TIMEOUT] ifname count
labgrid-raw-interface tcpdump: error: the following arguments are
required: count
The original commit introducing the option actually included it [1]. Fix
that by re-adding `nargs="?"`.
[1] 90cf941 ("helpers: add labgrid-raw-interface helper")
Fixes: c1aec37 ("helpers/labgrid-raw-interface: introduce subparsers per program, pass options")
Signed-off-by: Bastian Krause <bst@pengutronix.de>1 parent 03429b4 commit 1e207b2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments