Added locked file from write variables.

develop
Самоукин Алексей 14 years ago
parent 47bde732c5
commit 3fac00f83f

@ -4983,6 +4983,7 @@ class iniParser(_error, templateFormat):
return textIni
def writeIniFile(self, txtConfig):
import fcntl
if not os.path.exists(self.iniFile):
try:
# Создание файла
@ -4997,6 +4998,7 @@ class iniParser(_error, templateFormat):
except:
self.setError(_("Unable to open file") + ": " + self.iniFile)
return False
fcntl.flock(FD.fileno(), fcntl.LOCK_EX)
FD.truncate(0)
FD.seek(0)
FD.write(txtConfig)

Loading…
Cancel
Save