コード例 #1
0
ファイル: fields.py プロジェクト: paxswill/pootle
 def savestore(self):
     """Saves to temporary file then moves over original file. This way we
     avoid the need for locking.
     """
     import shutil
     from pootle.core.utils import ptempfile as tempfile
     tmpfile, tmpfilename = tempfile.mkstemp(suffix=self.filename)
     os.close(tmpfile)
     self.store.savefile(tmpfilename)
     shutil.move(tmpfilename, self.realpath)
     self._touch_store_cache()
コード例 #2
0
ファイル: fields.py プロジェクト: SafaAlfulaij/pootle
 def savestore(self):
     """Saves to temporary file then moves over original file. This way we
     avoid the need for locking.
     """
     import shutil
     from pootle.core.utils import ptempfile as tempfile
     tmpfile, tmpfilename = tempfile.mkstemp(suffix=self.filename)
     os.close(tmpfile)
     self.store.savefile(tmpfilename)
     shutil.move(tmpfilename, self.realpath)
     self._touch_store_cache()