#NEWLINE# def process_image_diff( diff_path , before_path , after_path ) : #NEWLINE# #INDENT# cmd = [ 'perceptualdiff' , '-output' , diff_path , before_path , after_path ] #NEWLINE# try : #NEWLINE# #INDENT# proc = subprocess . Popen ( cmd ) #NEWLINE# code = proc . wait ( ) #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# fail ( ( 'Failed to run: %s' % ' ' . join ( cmd ) ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# return code