summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2006-01-23 00:01:31 +0000
committerBrian Harring <ferringb@gentoo.org>2006-01-23 00:01:31 +0000
commit18d2d53f32163a0c29eaf2f2c7a4649956d8c4f7 (patch)
treee400865c80cfca2c73e93d2c057beadce012f66f
parentb28e96561e17281937ca62c1f904f8ef3f64d54e (diff)
downloadportage-18d2d53f32163a0c29eaf2f2c7a4649956d8c4f7.tar.gz
portage-18d2d53f32163a0c29eaf2f2c7a4649956d8c4f7.tar.bz2
portage-18d2d53f32163a0c29eaf2f2c7a4649956d8c4f7.zip
verify_all occasionally returns longs rather then strings.
Wouldn't be a problem, but the writemsg code isn't written to do conversions on the fly... so, made it so it was. svn path=/main/trunk/; revision=2570
-rw-r--r--pym/portage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 0bf16c6be..e05d311c5 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1927,10 +1927,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
# Verify checksums at each fetch for fetchonly.
verified_ok,reason = portage_checksum.verify_all(mysettings["DISTDIR"]+"/"+myfile, mydigests[myfile])
if not verified_ok:
+ print reason
writemsg("!!! Previously fetched file: "+str(myfile)+"\n")
writemsg("!!! Reason: "+reason[0]+"\n")
- writemsg("!!! Got: "+reason[1]+"\n")
- writemsg("!!! Expected: "+reason[2]+"\n")
+ writemsg("!!! Got: %s\n!!! Expected: %s\n" % (reason[0], reason[1]))
writemsg("Refetching...\n\n")
os.unlink(mysettings["DISTDIR"]+"/"+myfile)
fetched=0
@@ -2030,10 +2030,10 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
# from another mirror...
verified_ok,reason = portage_checksum.verify_all(mysettings["DISTDIR"]+"/"+myfile, mydigests[myfile])
if not verified_ok:
+ print reason
writemsg("!!! Fetched file: "+str(myfile)+" VERIFY FAILED!\n")
writemsg("!!! Reason: "+reason[0]+"\n")
- writemsg("!!! Got: "+reason[1]+"\n")
- writemsg("!!! Expected: "+reason[2]+"\n")
+ writemsg("!!! Got: %s\n!!! Expected: %s\n" % (reason[0], reason[1]))
writemsg("Removing corrupt distfile...\n")
os.unlink(mysettings["DISTDIR"]+"/"+myfile)
fetched=0