From 8a1456c1825ed7eff961909bb76889bdaf0de76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Mon, 5 Dec 2016 13:57:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0=20ini.evn/[update]=20->=20?= =?UTF-8?q?[system]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 12 ++++++------ pym/update/variables/update.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index efc20f1..41f95fe 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -77,14 +77,14 @@ class OverlayOwnCache(MutableSet): self.dv = dv def __get_overlays(self): - own_cache_value = SystemIni(self.dv).getVar('update', 'own_cache') or "" + own_cache_value = SystemIni(self.dv).getVar('system', 'own_cache') or "" return [x.strip() for x in own_cache_value.split(',') if x.strip()] def __write_overlays(self, overlays): if not overlays: - SystemIni(self.dv).delVar('update', 'own_cache') + SystemIni(self.dv).delVar('system', 'own_cache') else: - SystemIni(self.dv).setVar('update', + SystemIni(self.dv).setVar('system', {'own_cache': ",".join(overlays)}) def __contains__(self, item): @@ -223,7 +223,7 @@ class Update(MethodsInterface): if not status: self.printWARNING(_("Updates autocheck is not enabled")) return False - last_check = SystemIni(self.clVars).getVar('update', 'last_check') or "" + last_check = SystemIni(self.clVars).getVar('system', 'last_check') or "" re_interval = re.compile("^(\d+)\s*(hours?|days?|weeks?)?", re.I) interval_match = re_interval.search(interval) MINUTE = 60 @@ -781,7 +781,7 @@ class Update(MethodsInterface): """ Установить отметку о запуске запланированной проверки """ - SystemIni(self.clVars).setVar('update', {'last_check': str(int(time.time()))}) + SystemIni(self.clVars).setVar('system', {'last_check': str(int(time.time()))}) def get_default_emerge_opts(self): return self.clVars.Get('cl_emerge_default_opts') @@ -1200,7 +1200,7 @@ class Update(MethodsInterface): new_ts = new_ts[0] if new_ts.isdigit(): ini = SystemIni(self.clVars) - ini.setVar('update', {'last_update': new_ts}) + ini.setVar('system', {'last_update': new_ts}) if self.clVars.Get('cl_action') == 'sync': value = self.clVars.GetBool('cl_update_binhost_stable_set') new_value = self.clVars.GetBool('cl_update_binhost_stable_opt_set') diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 8238c0d..b103acf 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -419,7 +419,7 @@ class VariableClUpdateLastTimestamp(ReadonlyVariable): def get(self): ini = SystemIni(self.parent) - return ini.getVar('update', 'last_update') or "0" + return ini.getVar('system', 'last_update') or "0" class VariableClUpdateBinhostTime(FieldValue, ReadonlyVariable):