summaryrefslogtreecommitdiffstats
path: root/pym/portage_manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage_manifest.py')
-rw-r--r--pym/portage_manifest.py13
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