Skip to content

Commit

Permalink
Remove temp downloaded file once checksum is done
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Oct 16, 2023
1 parent 88f535f commit 032b3f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/incomplete_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def _get_checksum_from_file(self, incomplete_file: IncompleteFile):
use_shell=True,
)

# No matter what remove temp file
logger.debug("Deleting temp file...")
os.remove(incomplete_file.temp_filename)

if success:
# If success but stdout is empty it means something went wrong
if stdout.lstrip().rstrip() == "":
Expand Down

0 comments on commit 032b3f1

Please sign in to comment.