summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-28 02:34:27 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-28 02:34:27 +0000
commit5e49882db981f4985e9cb225f704c756d23d2ce7 (patch)
tree25514fd84764e11388077b6d3ea096c4242cb751
parent868d86ce3d70f59feb3ea4445839ae15b1863aef (diff)
downloadportage-5e49882db981f4985e9cb225f704c756d23d2ce7.tar.gz
portage-5e49882db981f4985e9cb225f704c756d23d2ce7.tar.bz2
portage-5e49882db981f4985e9cb225f704c756d23d2ce7.zip
Use write_atomic() for manifest updates.
svn path=/main/trunk/; revision=10016
-rw-r--r--pym/portage/manifest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py
index 910c03d18..9c8ab371a 100644
--- a/pym/portage/manifest.py
+++ b/pym/portage/manifest.py
@@ -222,10 +222,8 @@ class Manifest(object):
else:
raise
if update_manifest:
- fd = open(self.getFullname(), "w")
- for myentry in myentries:
- fd.write("%s\n" % str(myentry))
- fd.close()
+ write_atomic(self.getFullname(),
+ "".join("%s\n" % str(myentry) for myentry in myentries))
if sign:
self.sign()
except (IOError, OSError), e: