lookaside: Remove tempfile when hash verification fails
Without this, tempfiles just accumulate.
This commit is contained in:
parent
dc0ddb5392
commit
76d83b13a0
1 changed files with 1 additions and 0 deletions
|
@ -188,6 +188,7 @@ def main():
|
||||||
tmpfd.close()
|
tmpfd.close()
|
||||||
check_md5sum = m.hexdigest()
|
check_md5sum = m.hexdigest()
|
||||||
if md5sum != check_md5sum:
|
if md5sum != check_md5sum:
|
||||||
|
os.unlink(tmpfile)
|
||||||
send_error("MD5 check failed. Received %s instead of %s." % (check_md5sum, md5sum))
|
send_error("MD5 check failed. Received %s instead of %s." % (check_md5sum, md5sum))
|
||||||
|
|
||||||
# wow, even the MD5SUM matches. make sure full path is valid now
|
# wow, even the MD5SUM matches. make sure full path is valid now
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue