Skip to content

Commit 24ac99c

Browse files
author
Carl Chang
committed
add dest to optional arguments
1 parent 8fb8107 commit 24ac99c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

check_snmp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88

99
_parser = argparse.ArgumentParser()
10-
_parser.add_argument('-v', help='The SNMP version to use.', default='2c')
11-
_parser.add_argument('-c', help='The community string to use.', default='public')
12-
_parser.add_argument('-r', help='Respect properties marked as important when other results contain errors.', action='store_true')
10+
_parser.add_argument('-v', dest='version', help='The SNMP version to use.', default='2c')
11+
_parser.add_argument('-c', dest='community', help='The community string to use.', default='public')
12+
_parser.add_argument('-r', dest='respect', help='Respect properties marked as important when other results contain errors.', action='store_true')
1313
_parser.add_argument('host', help='The host to connect to.')
1414
_args = _parser.parse_args()
1515
args_Host = _args.host
16-
args_Version = _args.v
17-
args_Community = _args.c
18-
args_RespectImp = _args.r
16+
args_Version = _args.version
17+
args_Community = _args.community
18+
args_RespectImp = _args.respect
1919

2020

2121
# get base folder

0 commit comments

Comments
 (0)