def wait_for_res(self):
while not self.res_is_downloaded:
if not self.download_thread.is_alive():
logger.info('download thread exit in exceptions')
self.download_thread.join()
# raise DownloadError('download thread exit in exceptions')
logger.debug(
"Waiting for resource to complete, "
"size of %s is %s now" %
(self.res_url, self.res_downloaded_size()))
time.sleep(2)
return True
评论列表
文章目录