diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-23 07:23:40 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-23 07:23:40 +0000 |
commit | 1b595dc863ef022b62200f55556b3cdfb9387a64 (patch) | |
tree | 5e9f825b857edf000674e54227d36a1ba8dfa856 | |
parent | ecd5326e963f467e127cf19376097cef744b932c (diff) | |
download | portage-1b595dc863ef022b62200f55556b3cdfb9387a64.tar.gz portage-1b595dc863ef022b62200f55556b3cdfb9387a64.tar.bz2 portage-1b595dc863ef022b62200f55556b3cdfb9387a64.zip |
Fix FileNotFound error when ignoreMissing=True for bug #130928.
svn path=/main/trunk/; revision=3194
-rw-r--r-- | pym/portage_manifest.py | 13 |
1 files changed, 9 insertions, 4 deletions
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 |