#NEWLINE# def http_error( self , response ) : #NEWLINE# #INDENT# with open ( 'error.html' , 'w' ) as f : #NEWLINE# #INDENT# f . write ( self . text ) #NEWLINE# #UNINDENT# raise ValueError ( ( ( 'Error type ' + str ( response . status_code ) ) + ' file written: error.html' ) )