atomic_ofstream: suppress redundant open error
authorZac Medico <zmedico@gentoo.org>
Wed, 25 May 2011 04:52:40 +0000 (21:52 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 25 May 2011 04:52:40 +0000 (21:52 -0700)
pym/portage/util/__init__.py

index c28843475cedd242c9452539a99391b52ad56ea0..3cf6c5bab9b58635c5bdee03feb7e390f4a57d68 100644 (file)
@@ -1125,9 +1125,9 @@ class atomic_ofstream(ObjectProxy):
                        except IOError as e:
                                if canonical_path == filename:
                                        raise
-                               writemsg(_("!!! Failed to open file: '%s'\n") % tmp_name,
-                                       noiselevel=-1)
-                               writemsg("!!! %s\n" % str(e), noiselevel=-1)
+                               # Ignore this error, since it's irrelevant
+                               # and the below open call will produce a
+                               # new error if necessary.
 
                object.__setattr__(self, '_real_name', filename)
                tmp_name = "%s.%i" % (filename, os.getpid())