From 5e2982d998ac5683612de4a776f92a0887a8839d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 16 Oct 2011 20:03:25 -0700 Subject: [PATCH] perform_checksum: OSerror to PermissionDenied --- pym/portage/checksum.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.26.2