Browse Source
Correctly handle subcommand help
etherdump --help and etherdump CMD --help should work.
pull/8/head
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with
8 additions and
6 deletions
-
bin/etherpump
|
|
@ -52,6 +52,7 @@ try: |
|
|
|
else: |
|
|
|
args = sys.argv[2:] |
|
|
|
|
|
|
|
if len(sys.argv) < 3: |
|
|
|
if any(arg in args for arg in ['--help', '-h']): |
|
|
|
print(usage) |
|
|
|
sys.exit(0) |
|
|
@ -62,6 +63,7 @@ try: |
|
|
|
except IndexError: |
|
|
|
print(usage) |
|
|
|
sys.exit(0) |
|
|
|
|
|
|
|
try: |
|
|
|
# http://stackoverflow.com/questions/301134/dynamic-module-import-in-python |
|
|
|
cmdmod = __import__( |
|
|
|