'Update the amount of hops for a specified download. This can be done on runtime.'

def update_download_hops(self, download, new_hops):

    infohash = binascii.hexlify(download.tdef.get_infohash())
    self._logger.info('Updating    the    amount    of    hops    of    download    %s', infohash)
    self.session.remove_download(download)
    dscfg = download.copy()
    dscfg.set_hops(new_hops)
    self.register_task(('reschedule_download_%s' % infohash), reactor.callLater(3, self.session.start_download_from_tdef, download.tdef, dscfg))
