Consistency fixes

The `filepath` variable is defined before the `if` and used throughout the first block, so we should use it in the `else` block too.

Otherwise, a change to that variable would change the first block but not the second block.
This commit is contained in:
tcely 2024-12-25 00:21:58 -05:00 committed by GitHub
parent 3b41c8df81
commit 0795eb951d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -446,7 +446,7 @@ def download_media(media_id):
else:
# Expected file doesn't exist on disk
err = (f'Failed to download media: {media} (UUID: {media.pk}) to disk, '
f'expected outfile does not exist: {media.filepath}')
f'expected outfile does not exist: {filepath}')
log.error(err)
# Raising an error here triggers the task to be re-attempted (or fail)
raise DownloadFailedException(err)