From 0a33c899712fd43bcad71bb194b3208157236b65 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 9 Jul 2006 20:34:55 +0000 Subject: [PATCH] Use write_atomic for dblink metadata updates. svn path=/main/trunk/; revision=3824 --- pym/portage.py | 4 +--- 1 file changed, 1 insertion(+), 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): -- 2.26.2