summaryrefslogtreecommitdiffstats
path: root/pym/portage/checksum.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r--pym/portage/checksum.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index 9f3d81cff..e0bff2ada 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -284,8 +284,10 @@ def perform_checksum(filename, hashname="MD5", calc_prelink=0):
" hash function not available (needs dev-python/pycrypto)")
myhash, mysize = hashfunc_map[hashname](myfilename)
except (OSError, IOError) as e:
- if e.errno == errno.ENOENT:
+ if e.errno in (errno.ENOENT, errno.ESTALE):
raise portage.exception.FileNotFound(myfilename)
+ elif e.errno == portage.exception.PermissionDenied.errno:
+ raise portage.exception.PermissionDenied(myfilename)
raise
return myhash, mysize
finally: