#!/usr/bin/env python """usage: %(program)s 2 and fields[2] in ['TXT', 'A']: dig.close() return "+OK "+s+" is working" dig.close() return "-ERR "+s+" is not working" errors = 0 out = '' while 1: inl = sys.stdin.readline() if not inl: break match = re.match(r'\s+-r\s*(\S+)', inl) if match: ok = testone(match.group(1)) out = out + ok + "\n" if ok[0] == '-': errors = 1 if errors: print out sys.exit(1)