Added command to list included protocols.
This commit is contained in:
parent
4e8326ea6c
commit
211fdc3bb4
8
protocol
8
protocol
@ -483,6 +483,7 @@ class Main():
|
|||||||
print(" -h, --help : Displays this help information")
|
print(" -h, --help : Displays this help information")
|
||||||
print(" -n, --no-numbers : Do not print bit numbers on top of the header")
|
print(" -n, --no-numbers : Do not print bit numbers on top of the header")
|
||||||
print(" -V, --version : Displays current version")
|
print(" -V, --version : Displays current version")
|
||||||
|
print(" -l, --list : List included protocols")
|
||||||
print(" --evenchar <char> : Character for the even positions of horizontal table borders")
|
print(" --evenchar <char> : Character for the even positions of horizontal table borders")
|
||||||
print(" --oddchar <char> : Character for the odd positions of horizontal table borders")
|
print(" --oddchar <char> : Character for the odd positions of horizontal table borders")
|
||||||
print(" --startchar <char> : Character that starts horizontal table borders")
|
print(" --startchar <char> : Character that starts horizontal table borders")
|
||||||
@ -624,6 +625,13 @@ class Main():
|
|||||||
print("%s v%s" % (APPLICATION_NAME, APPLICATION_VERSION))
|
print("%s v%s" % (APPLICATION_NAME, APPLICATION_VERSION))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
# Display included protocols
|
||||||
|
elif argv[i]=="-l" or argv[i]=="--list":
|
||||||
|
for spec in specs.protocols.keys():
|
||||||
|
print(spec, "", end="")
|
||||||
|
print()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
# Incorrect option supplied
|
# Incorrect option supplied
|
||||||
elif argv[i].startswith("-"):
|
elif argv[i].startswith("-"):
|
||||||
print("ERROR: Invalid option supplied (%s)" % argv[i])
|
print("ERROR: Invalid option supplied (%s)" % argv[i])
|
||||||
|
Loading…
Reference in New Issue
Block a user