Skip to content

Commit 8a3b35f

Browse files
committed
auto merge of #10464 : gutworth/rust/snap-err, r=pnkfelix
...tatement
2 parents 49c6ae1 + d328ab7 commit 8a3b35f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/etc/snapshot.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,11 @@ def get_url_to_file(u,f):
148148
returncode = subprocess.call(["wget", "-O", tmpf, u])
149149

150150
if returncode != 0:
151-
os.unlink(tmpf)
152-
raise
151+
try:
152+
os.unlink(tmpf)
153+
except OSError as e:
154+
pass
155+
raise Exception("failed to fetch url")
153156
os.rename(tmpf, f)
154157

155158
def snap_filename_hash_part(snap):

0 commit comments

Comments
 (0)