projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60a2c22
)
perform_checksum: OSerror to PermissionDenied
author
Zac Medico
<zmedico@gentoo.org>
Mon, 17 Oct 2011 03:03:25 +0000
(20:03 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 17 Oct 2011 03:03:25 +0000
(20:03 -0700)
pym/portage/checksum.py
patch
|
blob
|
history
diff --git
a/pym/portage/checksum.py
b/pym/portage/checksum.py
index 9f3d81cff8010e5560cb0eb982e8e5af511c0d87..e0bff2ada1ea8e0a882a5292466d54c391984299 100644
(file)
--- 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: