From 1b595dc863ef022b62200f55556b3cdfb9387a64 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 23 Apr 2006 07:23:40 +0000 Subject: Fix FileNotFound error when ignoreMissing=True for bug #130928. svn path=/main/trunk/; revision=3194 --- pym/portage_manifest.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 1320ba235..1ca793c80 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -465,10 +465,15 @@ class Manifest(object): def checkFileHashes(self, ftype, fname, ignoreMissing=False): myhashes = self.fhashdict[ftype][fname] - ok,reason = verify_all(self._getAbsname(ftype, fname), self.fhashdict[ftype][fname]) - if not ok: - raise DigestException(tuple([self._getAbsname(ftype, fname)]+list(reason))) - return ok, reason + try: + ok,reason = verify_all(self._getAbsname(ftype, fname), self.fhashdict[ftype][fname]) + if not ok: + raise DigestException(tuple([self._getAbsname(ftype, fname)]+list(reason))) + return ok, reason + except FileNotFound, e: + if not ignoreMissing: + raise + return False, "File Not Found: '%s'" % str(e) def checkCpvHashes(self, cpv, checkDistfiles=True, onlyDistfiles=False, checkMiscfiles=False): """ check the hashes for all files associated to the given cpv, include all -- cgit v1.2.3-1-g7c22