#NEWLINE# def refactor_successful( self , response ) : #NEWLINE# #INDENT# self . status_message ( ( 'Refactoring with diff file: ' + response . diff_file ) ) #NEWLINE# from . patch import fromfile #NEWLINE# patch_set = fromfile ( error . diff_file ) #NEWLINE# result = patch_set . apply ( 0 , '/' ) #NEWLINE# if result : #NEWLINE# #INDENT# self . reload_file ( ) #NEWLINE# self . logger . info ( ( 'Refactoring succeeded, patch file: ' + response . diff_file ) ) #NEWLINE# self . status_message ( 'Refactoring succeeded' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . logger . error ( 'Patch refactoring failed' ) #NEWLINE# self . logger . error ( ( 'patch file: ' + response . diff_file ) ) #NEWLINE# error = ( 'Refactor failed: ' + response . diff_file ) #NEWLINE# self . status_message ( error ) #NEWLINE# #UNINDENT# self . logger . info ( ( 'Refactoring succeeded, patch file: ' + response . diff_file ) )