#!%(python_path)s# BEWARE: This file is operated by slapgrid# BEWARE: It will be overwritten automaticallyimport socketaddress = "%(value)s"try: socket.inet_pton(socket.AF_INET, address)except AttributeError: # no inet_pton here, sorry try: socket.inet_aton(address) except socket.error: sys.exit(127) if address.count('.') != 3: sys.exit(127)except socket.error: # not a valid address sys.exit(127)