fix(worker): unbound variable when episode url returns HTTP 404 (#2844)

### Description

When the episode URL return a 404, the tmp_file is never set, and we
have an unbound variable exception.
This commit is contained in:
Jonas L 2023-12-28 14:05:35 +01:00 committed by GitHub
parent 413b37d5e5
commit 3f396895e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ def podcast_download(
Status of the podcast download as JSON string. Status of the podcast download as JSON string.
""" """
result: Dict[str, Any] = {"episodeid": episode_id} result: Dict[str, Any] = {"episodeid": episode_id}
tmp_file = None
try: try:
# Download podcast episode file # Download podcast episode file