def process(infile, outfile):
# Write headers
- file.write("# Do not edit, file autogenerated by %s\n" % sys.argv[0])
+ outfile.write("# Do not edit, file autogenerated by %s\n" % sys.argv[0])
if len(sys.argv) > 1 and sys.argv[1] != '-':
- file.write("# This file has been generated from %s\n" % sys.argv[1])
+ outfile.write("# This file has been generated from %s\n" % sys.argv[1])
re_domain_name = re.compile(r'[a-z0-9.\-]+\.[a-z]+')
re_ip_address = re.compile(r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')