From 052f9c987453d934e1d4051ddab08b8c75aacb8e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 22 Dec 2022 12:45:53 +0300 Subject: [PATCH] =?UTF-8?q?TG-70=20cl-update:=20Fix:=20=D0=B2=D1=8B=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D1=8F=20=D0=B0=D0=B4=D0=B0=D0=BF=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=20=D0=BF=D0=BE=D0=B4=20--skip-option?= =?UTF-8?q?=20=D1=84=D0=BB=D0=B0=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/variables/update.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index b50eeb1..8ba0e31 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -176,6 +176,7 @@ class VariableClUpdateRepList(Variable): class VariableClUpdateInnerRepList(Variable): value = [] + check_after = ['cl_update_rep_list', 'cl_update_rep_hosting'] def get(self): def gen(): @@ -199,7 +200,6 @@ class VariableClUpdateRepHosting(Variable): class VariableClUpdateRepHostingChoice(Variable): type = "choice" - value = '' opt = ["--repo-update"] metavalue = "REPOSITORY URL" check_after = ['cl_update_inner_rep_list'] @@ -208,6 +208,14 @@ class VariableClUpdateRepHostingChoice(Variable): self.label = (_("Update repository")) self.help = (_("Hosting to download repository from")) + def get(self): + if not self.value: + if self.Get('cl_update_rep_hosting'): + self.value = self.Get('cl_update_rep_hosting') + else: + self.value = [x[1] for x in self.Get('cl_update_inner_rep_list')][0] or ['Default'] + return self.value + def choice(self): return [x[1] for x in self.Get('cl_update_inner_rep_list')] or ['Default']