diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-28 02:34:44 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-28 02:34:44 +0000 |
commit | 5a4ac6363544c5b359b0ec0b27140a555490c4a8 (patch) | |
tree | 0dcb040a63663215e7fb05d15da7d831300244a6 /pym/portage_manifest.py | |
parent | 1f348f0f2ae6d6b3cd39bf4faf2821c4c79f8175 (diff) | |
download | portage-5a4ac6363544c5b359b0ec0b27140a555490c4a8.tar.gz portage-5a4ac6363544c5b359b0ec0b27140a555490c4a8.tar.bz2 portage-5a4ac6363544c5b359b0ec0b27140a555490c4a8.zip |
Use write_atomic() for manifest updates. (trunk r10016)
svn path=/main/branches/2.1.2/; revision=10017
Diffstat (limited to 'pym/portage_manifest.py')
-rw-r--r-- | pym/portage_manifest.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 84189e1a5..95ce1efd4 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -385,10 +385,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: |