From: Zac Medico Date: Sun, 23 Apr 2006 07:23:40 +0000 (-0000) Subject: Fix FileNotFound error when ignoreMissing=True for bug #130928. X-Git-Tag: v2.1_pre10~80 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1b595dc863ef022b62200f55556b3cdfb9387a64;p=portage.git Fix FileNotFound error when ignoreMissing=True for bug #130928. svn path=/main/trunk/; revision=3194 --- 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