Skip to content

Commit 6a41af4

Browse files
authored
Change exit code from -1/255 to 3 to match Nagios plugin specs (#76)
1 parent 8b6917f commit 6a41af4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

check_esxi_hardware.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,14 +607,14 @@ def getopts() :
607607
if len(sys.argv) < 2:
608608
print("no parameters specified\n")
609609
parser.print_help()
610-
sys.exit(-1)
610+
sys.exit(3)
611611
# if first argument starts with 'https://' we have old-style parameters, so handle in old way
612612
if re.match("https://",sys.argv[1]):
613613
# check input arguments
614614
if len(sys.argv) < 5:
615615
print("too few parameters\n")
616616
parser.print_help()
617-
sys.exit(-1)
617+
sys.exit(3)
618618
if len(sys.argv) > 5 :
619619
if sys.argv[5] == "verbose" :
620620
verbose = True
@@ -632,7 +632,7 @@ def getopts() :
632632
if not options.__dict__[m]:
633633
print("mandatory option '" + m + "' not defined. read usage in help.\n")
634634
parser.print_help()
635-
sys.exit(-1)
635+
sys.exit(3)
636636

637637
hostname=options.host.lower()
638638
# if user has put "https://" in front of hostname out of habit, do the right thing

0 commit comments

Comments
 (0)