From 61de47ebd281cbe20e0e626af83e88088d6576af Mon Sep 17 00:00:00 2001 From: iborodikhin Date: Mon, 10 Sep 2012 12:36:15 +0600 Subject: [PATCH] Adding 'warning' environment variable use --- plugins/sphinx/sphindex_ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/sphinx/sphindex_ b/plugins/sphinx/sphindex_ index 54ab773c..a924f561 100755 --- a/plugins/sphinx/sphindex_ +++ b/plugins/sphinx/sphindex_ @@ -40,9 +40,12 @@ indexName = progName[progName.find("_")+1:] if len(sys.argv) == 2 and sys.argv[1] == "autoconf": print "yes" elif len(sys.argv) == 2 and sys.argv[1] == "config": + warning = "0:" critical = "0:" + if "warning" in os.environ and os.environ["warning"] != None: + warning = os.environ["warning"] if "critical" in os.environ and os.environ["critical"] != None: - warning = os.environ["critical"] + critical = os.environ["critical"] print "graph_title Sphinx index %s stats" % indexName print "graph_vlabel docs count"