From: Zac Medico Date: Sun, 9 Jul 2006 20:34:55 +0000 (-0000) Subject: Use write_atomic for dblink metadata updates. X-Git-Tag: v2.1.1~255 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0a33c899712fd43bcad71bb194b3208157236b65;p=portage.git Use write_atomic for dblink metadata updates. svn path=/main/trunk/; revision=3824 --- 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):