From 18d2d53f32163a0c29eaf2f2c7a4649956d8c4f7 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Mon, 23 Jan 2006 00:01:31 +0000 Subject: 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 --- pym/portage.py | 8 ++++---- 1 file 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 -- cgit v1.2.3-1-g7c22