|
|
|
@ -26,6 +26,8 @@ class UpdateInfo(object):
|
|
|
|
|
"""
|
|
|
|
|
Информационный объект о процессе обновления
|
|
|
|
|
"""
|
|
|
|
|
section = "update"
|
|
|
|
|
varname = "updates"
|
|
|
|
|
|
|
|
|
|
def __init__(self, dv=None):
|
|
|
|
|
if dv is None:
|
|
|
|
@ -37,11 +39,16 @@ class UpdateInfo(object):
|
|
|
|
|
def need_update(self):
|
|
|
|
|
return self.update_ready() or self.check_for_dispatch()
|
|
|
|
|
|
|
|
|
|
def update_ready(self):
|
|
|
|
|
@classmethod
|
|
|
|
|
def update_ready(cls):
|
|
|
|
|
"""
|
|
|
|
|
Проверить есть ли обновления по ini.env
|
|
|
|
|
"""
|
|
|
|
|
return SystemIni().getVar('update', 'packages') == u'on'
|
|
|
|
|
return SystemIni().getVar(cls.section, cls.varname) == u'on'
|
|
|
|
|
|
|
|
|
|
def set_update_ready(self, value):
|
|
|
|
|
SystemIni().setVar(self.section,
|
|
|
|
|
{self.varname:"on" if value else "off"})
|
|
|
|
|
|
|
|
|
|
def check_for_dispatch(self):
|
|
|
|
|
"""
|
|
|
|
|