From 75a9f4cce982fbbe64c044c8f79246bbda8ceba7 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Jan 2023 16:38:05 +0300 Subject: [PATCH] =?UTF-8?q?TG-154=20=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D0=BE=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BC=D0=BE=D1=81=D1=82=D1=8C=20=D1=81=20=D1=83=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B5=D0=B2=D1=88=D0=B8=D0=BC=D0=B8=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index 6270a4a..56aa203 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -426,9 +426,24 @@ class Update(MethodsInterface): working_host, url, rpath, revision = self.checkUrl(host, host_urls, repname, dv, git) if working_host: break - if not working_host: + # --------------DEPRECATED--------------# + if not all([working_host, rpath, revision, url]): dv.Write('cl_update_rep_hosting', ' ') - raise UpdateError(_("Git is unavailable")) + if not dv.Get("cl_update_rep_url"): + raise UpdateError(_("Git is unavailable")) + url, rpath, revision = ( + dv.Select(["cl_update_rep_url", "cl_update_rep_path", + "cl_update_rep_rev"], + where="cl_update_rep_name", eq=repname, limit=1)) + + if not url or not rpath: + raise UpdateError(_("Configuration variables for repositories " + "are not setup")) + git = self.getGit() + if not git.checkUrl(url): + raise UpdateError(_("Git %s is unavailable") % url) + + if working_host: dv.Write('cl_update_rep_hosting', working_host)