aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/binrepo.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/binrepo.py')
-rw-r--r--MgaRepo/binrepo.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/MgaRepo/binrepo.py b/MgaRepo/binrepo.py
index 51a1940..1ad3549 100644
--- a/MgaRepo/binrepo.py
+++ b/MgaRepo/binrepo.py
@@ -57,7 +57,10 @@ def download_binary(topdir, sha1, filename):
url = mirror.normalize_path(url + "/" + sha1)
dest = os.path.join(topdir, 'SOURCES', filename)
if os.path.exists(dest):
- return 1
+ if file_hash(dest) == sha1:
+ return 1
+ else:
+ raise Error, "File with incorrect sha1sum: %s" % dest
context = {"dest": dest, "url": url}
try:
cmd = string.Template(fmt).substitute(context)