summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-11-02 09:20:15 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-11-02 09:20:15 +0200
commitf2835e1e509e168aa2e91f03ea18b51f5f9fc428 (patch)
treed096a6d01cb207847bb4c1967262142abe1c86cb /scripts
parent63808ab2968701a05b9a79b0a91ec2ed551061ab (diff)
dpdk_setup_ports: do not check if TRex is already running when called --help
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpdk_setup_ports.py5
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 ():