Fix digestcheck() to handle missing distfiles digests correctly. Thanks to
authorZac Medico <zmedico@gentoo.org>
Wed, 6 May 2009 22:12:44 +0000 (22:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 May 2009 22:12:44 +0000 (22:12 -0000)
Petteri Räty <betelgeuse@g.o> for reporting.

svn path=/main/trunk/; revision=13618

pym/portage/__init__.py

index 93031b796648de58e9799e466de1571bf3e5ebf2..6854eea99cf5ee94bb6a13dd4149f6a806ffc131 100644 (file)
@@ -4822,7 +4822,10 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
                        eout.eend(0)
                for f in myfiles:
                        eout.ebegin("checking %s ;-)" % f)
-                       mf.checkFileHashes(mf.findFile(f), f)
+                       ftype = mf.findFile(f)
+                       if ftype is None:
+                               raise KeyError(f)
+                       mf.checkFileHashes(ftype, f)
                        eout.eend(0)
        except KeyError, e:
                eout.eend(1)