Commit 115bb41b authored by Suresh V's avatar Suresh V

Don't leave junk file behind

parent 2b3d8ead
......@@ -200,7 +200,11 @@ download_file_curl.viable = has_curl
def download_file_wget(url, target):
cmd = ['wget', url, '--quiet', '--output-document', target]
subprocess.check_call(cmd)
try:
subprocess.check_call(cmd)
except subprocess.CalledProcessError:
os.unlink(target)
raise
def has_wget():
cmd = ['wget', '--version']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment