#NEWLINE# def flush_cookies( self , response ) : #NEWLINE# #INDENT# for ( key , opts ) in self . cookies . items ( ) : #NEWLINE# #INDENT# response . set_cookie ( key , quote ( ( opts . get ( 'value' ) or '' ) . encode ( 'utf-8' ) ) , expires = opts . get ( 'expires' ) ) #NEWLINE# #UNINDENT# expires = ( datetime . datetime . now ( ) + datetime . timedelta ( days = ( - 1 ) ) ) #NEWLINE# for key in set ( self . to_delete ) : #NEWLINE# #INDENT# response . set_cookie ( key , '' , expires = expires )