Commit 63135c37 authored by Jim Fulton's avatar Jim Fulton

Python 2.6 supports Python 3 except syntax. Who knew?

parent 63ef0ac3
......@@ -71,8 +71,8 @@ def check(addr, output_metrics, status, per):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
try:
s.connect(addr)
except socket.error:
return error("Can't connect %s" % sys.exc_info()[1])
except socket.error as err:
return error("Can't connect %s" % err)
fp = s.makefile()
fp.write('\x00\x00\x00\x04ruok')
fp.flush()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment