aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2018-04-06 11:37:16 +0200
committerRoland Knall <rknall@gmail.com>2018-04-06 10:41:53 +0000
commit485cec5bdfc90d968b0970e657cf24435e22fe25 (patch)
tree7fa35a73fcb0d3fc101c81b136be39cc6184f5a7 /doc
parent024f75fb3e6576fe51fcc046932d876931d6beb8 (diff)
extcap: Fix version request
The original implementation lead to multiple extcap interfaces being loaded, as well as an error output from the default example. This fixes both Change-Id: Icb6fbda7bcb11ed0d14cb683ddcdabdc20a7070d Reviewed-on: https://code.wireshark.org/review/26773 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/extcap_example.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/extcap_example.py b/doc/extcap_example.py
index 35f2766f69..3e6b96b84c 100755
--- a/doc/extcap_example.py
+++ b/doc/extcap_example.py
@@ -421,7 +421,7 @@ if __name__ == '__main__':
parser.add_argument("--fifo", help="Use together with capture to provide the fifo to dump data to")
parser.add_argument("--extcap-control-in", help="Used to get control messages from toolbar")
parser.add_argument("--extcap-control-out", help="Used to send control messages to toolbar")
- parser.add_argument("--extcap-version", help="Shows the version of this utility", action="store_true")
+ parser.add_argument("--extcap-version", help="Shows the version of this utility", nargs='?', default="")
parser.add_argument("--extcap-reload-option", help="Reload elements for the given option")
# Interface Arguments
@@ -450,7 +450,7 @@ if __name__ == '__main__':
if ( len(sys.argv) <= 1 ):
parser.exit("No arguments given!")
- if ( args.extcap_version ):
+ if ( args.extcap_version and not args.extcap_interfaces ):
extcap_version()
sys.exit(0)