Исправлено создание отметки необходимости удаления старого ядра

develop 3.3.2_alpha2
Mike Khiretskiy il y a 9 ans
Parent e15842fe7c
révision 6584c7ef30

@ -21,7 +21,7 @@ from calculate.core.datavars import DataVarsCore
from calculate.core.server.gen_pid import search_worked_process
from calculate.lib.cl_template import SystemIni
from calculate.lib.utils.content import getCfgFiles
from calculate.lib.utils.files import getRunCommands, readFile
from calculate.lib.utils.files import getRunCommands, readFile, writeFile
import time
@ -92,10 +92,12 @@ class UpdateInfo(object):
@outdated_kernel.setter
def outdated_kernel(self, value):
flag_path = self.dv.Get('update.cl_update_outdated_kernel_path')
if value:
with open(flag_path, 'w') as f:
f.write(self.dv.Get('update.cl_update_kernel_version'))
else:
if path.exists(flag_path):
os.unlink(flag_path)
try:
if value:
with writeFile(flag_path) as f:
f.write(self.dv.Get('update.cl_update_kernel_version'))
else:
if path.exists(flag_path):
os.unlink(flag_path)
except IOError:
pass

Chargement…
Annuler
Enregistrer