From 0bc1b9376be86c32d7800973013f0975e6d5cc3d Mon Sep 17 00:00:00 2001 From: Tris Forster Date: Fri, 16 Oct 2020 17:56:40 +1100 Subject: [PATCH] Dont bail on error --- gitea-mirror.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitea-mirror.py b/gitea-mirror.py index e4192ca..f2a357d 100755 --- a/gitea-mirror.py +++ b/gitea-mirror.py @@ -19,7 +19,10 @@ def mirror_host(d, host, token): logger.info("Cloning new repo: %s", repo) os.makedirs(p, exist_ok=True) cmd = ['git', 'clone', '--mirror', url, p] - subprocess.run(cmd, check=True) + try: + subprocess.run(cmd, check=True) + except subprocess.CalledProcessError: + logger.exception("Failed to process %s", repo) def get_repos(host, token, pagesize=50):