From b6196a6a054f7008c12ae1be456120a0029bc458 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 7 Apr 2006 09:23:30 +0000 Subject: [PATCH] Raise exceptions when appropriate in the atomic_ofstream constructor for bug #129098. svn path=/main/trunk/; revision=3087 --- pym/portage_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pym/portage_util.py b/pym/portage_util.py index bd35e9a10..46a7d1052 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -627,6 +627,8 @@ class atomic_ofstream(file): super(atomic_ofstream, self).__init__(tmp_name, mode=mode, **kargs) return except (OSError, IOError), e: + if canonical_path == filename: + raise writemsg("!!! Failed to open file: '%s'\n" % tmp_name) writemsg("!!! %s\n" % str(e)) -- 2.26.2