From: Zac Medico Date: Fri, 7 Apr 2006 09:23:30 +0000 (-0000) Subject: Raise exceptions when appropriate in the atomic_ofstream constructor for bug #129098. X-Git-Tag: v2.1_pre8~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6196a6a054f7008c12ae1be456120a0029bc458;p=portage.git Raise exceptions when appropriate in the atomic_ofstream constructor for bug #129098. svn path=/main/trunk/; revision=3087 --- 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))