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.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage_checksum.py b/pym/portage_checksum.py
index a11dbc4f6..2dd447df2 100644
--- a/pym/portage_checksum.py
+++ b/pym/portage_checksum.py
@@ -131,9 +131,13 @@ def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
if retval==0:
#portage_util.writemsg(">>> prelink checksum '"+str(filename)+"'.\n")
myfilename=prelink_tmpfile
-
- myhash, mysize = hash_function(myfilename)
-
+ try:
+ myhash, mysize = hash_function(myfilename)
+ except (OSError, IOError), e:
+ if e.errno == errno.ENOENT:
+ raise portage_exception.FileNotFound(e)
+ else:
+ raise e
if calc_prelink and prelink_capable:
try:
os.unlink(prelink_tmpfile)