#NEWLINE# def _download( self , slot , request , spider ) : #NEWLINE# #INDENT# dfd = mustbe_deferred ( self . handlers . download_request , request , spider ) #NEWLINE# def _downloaded( response ) : #NEWLINE# #INDENT# self . signals . send_catch_log ( signal = signals . response_downloaded , response = response , request = request , spider = spider ) #NEWLINE# return response #NEWLINE# #UNINDENT# dfd . addCallback ( _downloaded ) #NEWLINE# slot . transferring . add ( self ) #NEWLINE# def finish_transferring( _ ) : #NEWLINE# #INDENT# slot . transferring . remove ( request ) #NEWLINE# self . _process_queue ( spider , slot ) #NEWLINE# return _ #NEWLINE# #UNINDENT# return dfd . addBoth ( finish_transferring )