From 7eb16282a89f0c269697b2a3abc1d19cbefc1373 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 23 Aug 2020 11:24:04 +0100
Subject: [PATCH] Catch project-level errors on set-hooks

---
 gitlab_deps/main.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gitlab_deps/main.py b/gitlab_deps/main.py
index 6fec413..47b2966 100644
--- a/gitlab_deps/main.py
+++ b/gitlab_deps/main.py
@@ -256,8 +256,12 @@ specified as '-'.
         projects = set(y[0] for y in (
             split_project_branch(x.strip()) for x in args.projects_list))
         for project_path in projects:
-            check_hook(gl, args.hook_url, args.webhook_auth_token,
-                       project_path, args.dry_run)
+            try:
+                check_hook(gl, args.hook_url, args.webhook_auth_token,
+                           project_path, args.dry_run)
+            except Exception as e:
+                logging.error('error checking project %s: %s',
+                              project_path, e)
 
     elif cmd == 'server':
         deps = read_deps(args.dependencies_list)
-- 
GitLab