summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-02-12 03:09:38 +0000
committerZac Medico <zmedico@gentoo.org>2006-02-12 03:09:38 +0000
commitcc21af8b923aeb27b7f3068d00dfe20b344d9cc9 (patch)
tree3f9fae0d2fdb030fc06656db245f789b61aa1a78
parentc4bfd524945b9782cbddcd176e4eeae73e06f6c3 (diff)
downloadportage-cc21af8b923aeb27b7f3068d00dfe20b344d9cc9.tar.gz
portage-cc21af8b923aeb27b7f3068d00dfe20b344d9cc9.tar.bz2
portage-cc21af8b923aeb27b7f3068d00dfe20b344d9cc9.zip
catch possible ENOENT error from portage_checksum.perform_md5 for bug 24374
svn path=/main/trunk/; revision=2695
-rw-r--r--pym/portage.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 143371a48..0a9186b5a 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5777,8 +5777,16 @@ class dblink:
if statobj is None or not stat.S_ISREG(statobj.st_mode):
writemsg_stdout("--- !obj %s %s\n" % ("obj", obj))
continue
- mymd5=portage_checksum.perform_md5(obj, calc_prelink=1)
-
+ mymd5 = None
+ try:
+ mymd5 = portage_checksum.perform_md5(obj, calc_prelink=1)
+ except (OSError,IOError), e:
+ if e.errno == errno.ENOENT:
+ # the file has disappeared between now and our stat call
+ writemsg_stdout("--- !obj %s %s\n" % ("obj", obj))
+ continue
+ else:
+ raise e
# string.lower is needed because db entries used to be in upper-case. The
# string.lower allows for backwards compatibility.
if mymd5 != string.lower(pkgfiles[objkey][2]):