summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-19 04:34:42 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-19 04:34:42 +0000
commitb8f12667b49a5994e0258b8ab88361aceb54bb3b (patch)
tree37616208f4417ff2d4f4c6257b2de6625067ab10
parentReset the selinux security context before returning from spawn (regression fr... (diff)
downloadportage-multirepo-b8f12667b49a5994e0258b8ab88361aceb54bb3b.tar.gz
portage-multirepo-b8f12667b49a5994e0258b8ab88361aceb54bb3b.tar.bz2
portage-multirepo-b8f12667b49a5994e0258b8ab88361aceb54bb3b.zip
Catch a possible OSError from the stat call in atomic_ofstream.close().
svn path=/main/trunk/; revision=2950
-rw-r--r--pym/portage_util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py
index aa84fa74..ae531217 100644
--- a/pym/portage_util.py
+++ b/pym/portage_util.py
@@ -628,6 +628,11 @@ class atomic_ofstream(file):
pass
except FileNotFound:
pass
+ except OSError, oe: # from the above os.stat call
+ if oe.errno in (errno.ENOENT, errno.EPERM):
+ pass
+ else:
+ raise
os.rename(self.name, self._real_name)
finally:
# Make sure we cleanup the temp file