diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-19 04:34:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-19 04:34:42 +0000 |
commit | b8f12667b49a5994e0258b8ab88361aceb54bb3b (patch) | |
tree | 37616208f4417ff2d4f4c6257b2de6625067ab10 | |
parent | f034aadcfd6887148455973bebd167961eee4b26 (diff) | |
download | portage-b8f12667b49a5994e0258b8ab88361aceb54bb3b.tar.gz portage-b8f12667b49a5994e0258b8ab88361aceb54bb3b.tar.bz2 portage-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.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py index aa84fa74e..ae5312175 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 |