aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/rpmutil.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index fce2e1c..7f3ebd7 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -552,7 +552,12 @@ def sync(dryrun=False, commit=False, download=False):
except KeyError, e:
raise Error, "invalid variable %r in download-command "\
"configuration option" % e
- execcmd(cmd, show=True)
+ try:
+ status, output = execcmd(cmd, show=True)
+ except Error, e:
+ os.unlink(sourcepath)
+ raise Error, "Could not download file %s\n" % url
+
if os.path.isfile(sourcepath):
toadd.append(sourcepath)
else: