cl-update: Fix: выбор репозитория адаптирован под --skip-option флаг
master 3.7.2.66
root 1 year ago
parent 9b04b1bca6
commit 052f9c9874

@ -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']

Loading…
Cancel
Save