From 6d0ce2c869153a4eec1ffc32ad856eb96cfe1613 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Fri, 6 Dec 2013 15:53:59 +0000 Subject: [PATCH] Allow -L without -H provided as well --- check_storwize/check_storwize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_storwize/check_storwize.py b/check_storwize/check_storwize.py index 320ec8b..c2e9100 100644 --- a/check_storwize/check_storwize.py +++ b/check_storwize/check_storwize.py @@ -15,12 +15,12 @@ p.add_option("--test", help="Run this plugin in test mode", dest="test", action= p.parse_arguments() +if p.options.list_queries is True: + p.parser.error("Valid Queries: %s" % valid_queries) if not p.options.hostname: p.parser.error("Required options -H is missing") if p.options.query not in valid_queries.split(): p.parser.error("%s does not look like a valid query. Use -L for a list of valid queries" % p.options.query) -if p.options.list_queries is True: - p.parser.error("Valid Queries: %s" % valid_queries) query = p.options.query