From: Erik Skultety Date: Thu, 24 Aug 2023 09:13:59 +0000 (+0200) Subject: ci: helper: Add a helper to create a local repo clone Pythonic way X-Git-Tag: v9.8.0-rc1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad2f892440ff80fc0e37f244c5fbfe7ab528293;p=thirdparty%2Flibvirt.git ci: helper: Add a helper to create a local repo clone Pythonic way A proper Python equivalent of 'git clone --local'. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé --- diff --git a/ci/helper b/ci/helper index 6aca089db4..392702ae41 100755 --- a/ci/helper +++ b/ci/helper @@ -196,6 +196,10 @@ class Application: if pty.spawn(["make"] + args) != 0: sys.exit("error: 'make' failed") + @staticmethod + def _prepare_repo_copy(repo, dest): + return repo.clone(dest, local=True) + def _lcitool_run(self, args): output = subprocess.check_output([self._args.lcitool] + args) return output.decode("utf-8")