From 7ed6fc284708b4e8329ba0ef64cffcc5f5752af5 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 24 Jan 2023 11:28:39 +0300 Subject: [PATCH] =?UTF-8?q?TG-125=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B0=20url=20=D0=BF=D1=80=D0=BE=D1=84=D0=B8=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/profile.py | 4 ---- pym/update/variables/update.py | 28 +++++++++++----------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/pym/update/profile.py b/pym/update/profile.py index edab59e..0a0da5b 100644 --- a/pym/update/profile.py +++ b/pym/update/profile.py @@ -241,10 +241,6 @@ class ProfileRepository(): return True return False - def is_like_local(self, local_path, rep_name): - - pass - @property def directory(self): """ diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index f5bed4e..f027647 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -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)