summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-09 20:34:55 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-09 20:34:55 +0000
commit0a33c899712fd43bcad71bb194b3208157236b65 (patch)
tree0c0a1689eed162e5624668139b5340224dbc18e6
parent2cea761d00a6460fce680cfd7f7bece2e138e569 (diff)
downloadportage-0a33c899712fd43bcad71bb194b3208157236b65.tar.gz
portage-0a33c899712fd43bcad71bb194b3208157236b65.tar.bz2
portage-0a33c899712fd43bcad71bb194b3208157236b65.zip
Use write_atomic for dblink metadata updates.
svn path=/main/trunk/; revision=3824
-rw-r--r--pym/portage.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 80358d4ed..1372ecb4e 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6737,9 +6737,7 @@ class dblink:
return mydata
def setfile(self,fname,data):
- myfile=open(self.dbdir+"/"+fname,"w")
- myfile.write(data)
- myfile.close()
+ write_atomic(os.path.join(self.dbdir, fname), data)
def getelements(self,ename):
if not os.path.exists(self.dbdir+"/"+ename):