diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-11-02 09:20:15 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-11-02 09:20:15 +0200 |
commit | f2835e1e509e168aa2e91f03ea18b51f5f9fc428 (patch) | |
tree | d096a6d01cb207847bb4c1967262142abe1c86cb | |
parent | 63808ab2968701a05b9a79b0a91ec2ed551061ab (diff) |
dpdk_setup_ports: do not check if TRex is already running when called --help
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
-rwxr-xr-x | scripts/dpdk_setup_ports.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 (): |