auto merge of #10464 : gutworth/rust/snap-err, r=pnkfelix

...tatement
This commit is contained in:
bors 2013-11-13 16:26:15 -08:00
commit 8a3b35f68a

View File

@ -148,8 +148,11 @@ def get_url_to_file(u,f):
returncode = subprocess.call(["wget", "-O", tmpf, u])
if returncode != 0:
os.unlink(tmpf)
raise
try:
os.unlink(tmpf)
except OSError as e:
pass
raise Exception("failed to fetch url")
os.rename(tmpf, f)
def snap_filename_hash_part(snap):