mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 18:33:45 +01:00
Fixed usage and error handlind
This commit is contained in:
parent
4aa5beab37
commit
fc00b12550
@ -28,7 +28,7 @@ def readbond( interface ):
|
|||||||
# Read interface info
|
# Read interface info
|
||||||
try:
|
try:
|
||||||
bondfh = open (intfile, 'r')
|
bondfh = open (intfile, 'r')
|
||||||
except IOError as (errno, strerror):
|
except IOError, (errno, strerror):
|
||||||
print "Unable to open bond %s: %s" % (intfile, strerror)
|
print "Unable to open bond %s: %s" % (intfile, strerror)
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
except:
|
except:
|
||||||
@ -68,7 +68,7 @@ def readbond( interface ):
|
|||||||
return bond
|
return bond
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print "Ble"
|
print "Usage: %s -i bond0" % sys.argv[0]
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
# Set variables
|
# Set variables
|
||||||
|
Loading…
Reference in New Issue
Block a user