|
|
|
@ -942,7 +942,6 @@ class VariableClUpdateTemplatesLocate(Variable):
|
|
|
|
|
def choice(self):
|
|
|
|
|
descr = lambda x: self.descriptionMap.get(x,
|
|
|
|
|
_("%s overlay templates" % x))
|
|
|
|
|
a = self.get()
|
|
|
|
|
return [(x, descr(x)) for x in self.get()]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1093,17 +1092,17 @@ class VariableClUpdateProfileUrl(Variable):
|
|
|
|
|
value = self.url_by_shortname(value)
|
|
|
|
|
return self.normalize_url(value)
|
|
|
|
|
|
|
|
|
|
# def check(self, value):
|
|
|
|
|
# if not value:
|
|
|
|
|
# return True
|
|
|
|
|
# try:
|
|
|
|
|
# branch = self.Get(self.branch)
|
|
|
|
|
# self.Get(self.storage).get_profiles(value, branch)
|
|
|
|
|
# except GitError as e:
|
|
|
|
|
# raise VariableError(str(e))
|
|
|
|
|
# if not self.Get(self.profiles_shortname):
|
|
|
|
|
# raise VariableError(_("Repository %s has no profiles") %
|
|
|
|
|
# value)
|
|
|
|
|
def check(self, value):
|
|
|
|
|
if not value:
|
|
|
|
|
return True
|
|
|
|
|
try:
|
|
|
|
|
branch = self.Get(self.branch)
|
|
|
|
|
self.Get(self.storage).get_profiles(value, branch)
|
|
|
|
|
except GitError as e:
|
|
|
|
|
raise VariableError(str(e))
|
|
|
|
|
if not self.Get(self.profiles_shortname):
|
|
|
|
|
raise VariableError(_("Repository %s has no profiles") %
|
|
|
|
|
value)
|
|
|
|
|
|
|
|
|
|
# def get(self):
|
|
|
|
|
# try:
|
|
|
|
@ -1364,11 +1363,6 @@ class VariableClUpdateProfileSystem(Variable):
|
|
|
|
|
return True
|
|
|
|
|
if not dv.Get('os_linux_name'):
|
|
|
|
|
raise VariableError("")
|
|
|
|
|
a = list(dv.Get('cl_update_rep_name'))
|
|
|
|
|
# if repo_name not in list(dv.Get('cl_update_rep_name')):
|
|
|
|
|
# raise VariableError(
|
|
|
|
|
# _("Overlay %s is not specified "
|
|
|
|
|
# "in cl_update_rep_name") % repo_name)
|
|
|
|
|
except (DataVarsError, VariableError) as e:
|
|
|
|
|
if str(e):
|
|
|
|
|
message = ". " + str(e)
|
|
|
|
|