From 485cec5bdfc90d968b0970e657cf24435e22fe25 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Fri, 6 Apr 2018 11:37:16 +0200 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- doc/extcap_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') 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) -- cgit v1.2.3