Change logging message to include submission ID

This commit is contained in:
Serene-Arc
2021-05-10 18:58:42 +10:00
committed by Serene
parent db8b1c7547
commit 7e70175e4c

View File

@@ -422,8 +422,8 @@ class RedditDownloader:
try: try:
res.download(self.args.max_wait_time) res.download(self.args.max_wait_time)
except errors.BulkDownloaderException as e: except errors.BulkDownloaderException as e:
logger.error( logger.error(f'Failed to download resource {res.url} in submission {submission.id} '
f'Failed to download resource {res.url} with downloader {downloader_class.__name__}: {e}') f'with downloader {downloader_class.__name__}: {e}')
return return
resource_hash = res.hash.hexdigest() resource_hash = res.hash.hexdigest()
destination.parent.mkdir(parents=True, exist_ok=True) destination.parent.mkdir(parents=True, exist_ok=True)