From f2835e1e509e168aa2e91f03ea18b51f5f9fc428 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 2 Nov 2016 09:20:15 +0200 Subject: dpdk_setup_ports: do not check if TRex is already running when called --help Signed-off-by: Yaroslav Brustinov --- scripts/dpdk_setup_ports.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index 5bbbdb28..538d0700 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -659,9 +659,12 @@ Other network devices def parse_parent_cfg (parent_cfg): parent_parser = argparse.ArgumentParser(add_help = False) + parent_parser.add_argument('-?', '-h', '--help', dest = 'help', action = 'store_true') parent_parser.add_argument('--cfg', default='') parent_parser.add_argument('--dump-interfaces', nargs='*', default=None) - args, unkown = parent_parser.parse_known_args(shlex.split(parent_cfg)) + args, _ = parent_parser.parse_known_args(shlex.split(parent_cfg)) + if args.help: + sys.exit(0) return (args.cfg, args.dump_interfaces) def process_options (): -- cgit