comparison refinery_test_tool.py @ 5:a410fb6c43fa draft

Minor changes
author hackdna
date Mon, 13 May 2013 16:05:56 -0400
parents f725e3820fb4
children ee221004e3b4
comparison
equal deleted inserted replaced
4:ccf0e1ca6fe9 5:a410fb6c43fa
27 quit("Processing failed by request", args) 27 quit("Processing failed by request", args)
28 28
29 input = read_files(args.input_files) 29 input = read_files(args.input_files)
30 try: 30 try:
31 for out_file in args.output_files: 31 for out_file in args.output_files:
32 out_file.write("Output file name: " + out_file.name + '\n\n') 32 out_file.write("Output file name: " + out_file.name + "\n\n")
33 out_file.write(input) 33 out_file.write(input)
34 except IOError as e: 34 except IOError as e:
35 cleanup(args) 35 cleanup(args)
36 parser.error(e) 36 parser.error(e)
37 else: 37 else:
53 '''Read files from disk into a string 53 '''Read files from disk into a string
54 54
55 ''' 55 '''
56 str = '' 56 str = ''
57 for in_file in file_list: 57 for in_file in file_list:
58 str += "Input file name: " + in_file.name + '\n' 58 str += "Input file name: " + in_file.name + "\n\n"
59 str += in_file.read() 59 str += in_file.read()
60 return str 60 return str
61 61
62 62
63 def cleanup(args): 63 def cleanup(args):