From: <sv...@ze...> - 2007-12-30 21:50:33
|
Author: cluther Date: 2007-12-30 16:50:11 -0500 (Sun, 30 Dec 2007) New Revision: 8058 Modified: trunk/zenpacks/ApacheMonitor/libexec/check_apache.py Log: * Fixes #2514: More helpful error message on ApacheMonitor failure. Modified: trunk/zenpacks/ApacheMonitor/libexec/check_apache.py =================================================================== --- trunk/zenpacks/ApacheMonitor/libexec/check_apache.py 2007-12-28 20:57:43 UTC (rev 8057) +++ trunk/zenpacks/ApacheMonitor/libexec/check_apache.py 2007-12-30 21:50:11 UTC (rev 8058) @@ -32,7 +32,8 @@ conn.request('GET', self.url) response = conn.getresponse() if response.status != 200: - print response.reason + print 'Server replied: %d %s to action GET %s' % ( + response.status, response.reason, self.url) sys.exit(1) data = response.read() @@ -87,6 +88,8 @@ elif code == '.': metrics['slotOpen'] += 1 + except SystemExit: + sys.exit(1) except Exception, e: print "Error: %s" % (e,) sys.exit(1) |