From 24319b2cca32410facd625a285c682fa8ca3490c Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Thu, 24 Aug 2023 10:24:12 +0200 Subject: [PATCH] ci: helper: Add Python code hangling git clones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helper will be utilized by a future patch which will add the lcitool container execution logic. The reason why the required_deps decorator isn't being used here is because this is a property. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé --- ci/helper | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/helper b/ci/helper index 4727145b28..6aca089db4 100755 --- a/ci/helper +++ b/ci/helper @@ -159,9 +159,18 @@ class Parser: class Application: + @property + def repo(self): + if self._repo is None: + from git import Repo + + self._repo = Repo(search_parent_directories=True) + return self._repo + def __init__(self): self._basedir = pathlib.Path(__file__).resolve().parent self._args = Parser().parse() + self._repo = None def _make_run(self, target): args = [