Commit d7e912bc authored by Marco Mariani's avatar Marco Mariani

minor cleanup

parent 55802c22
# vim: set et sts=2:
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
......
......@@ -7,15 +7,10 @@ import sys
hostname = "%(hostname)s"
port = %(port)s
connection_okay = False
try:
s = socket.create_connection((hostname, port))
connection_okay = True
s.close()
except (socket.error, socket.timeout):
connection_okay = False
if not connection_okay:
print >> sys.stderr, "%(port)s on %(hostname)s isn't listening"
sys.stderr.write("%(port)s on %(hostname)s isn't listening\n")
sys.exit(127)
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