From 6ea2837358347482044e3ae3ce0914f087a03a39 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 21 Aug 2011 11:42:27 +0000 Subject: remove file when there was an error during download --- MgaRepo/binrepo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/MgaRepo/binrepo.py b/MgaRepo/binrepo.py index 1ad3549..747f3eb 100644 --- a/MgaRepo/binrepo.py +++ b/MgaRepo/binrepo.py @@ -70,6 +70,7 @@ def download_binary(topdir, sha1, filename): try: status, output = execcmd(cmd, show=True) except Error, e: + os.unlink(dest) raise Error, "Could not download file %s\n" % url def download_binaries(topdir): -- cgit v1.2.1