#NEWLINE# def cancel( self , reason = None ) : #NEWLINE# #INDENT# if ( reason is None ) : #NEWLINE# #INDENT# reason = Failure ( DownloadCanceledError ( ) ) #NEWLINE# #UNINDENT# self . finished_cb ( self , self )