From cae5a8f785effddbb7cc5c3933d50e78d738a94a Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Thu, 28 Jan 2021 01:29:10 +0100 Subject: [PATCH] gitlab: skip another race condition in project creation --- fedeproxy/common/gitlab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fedeproxy/common/gitlab.py b/fedeproxy/common/gitlab.py index c594f14..607de88 100644 --- a/fedeproxy/common/gitlab.py +++ b/fedeproxy/common/gitlab.py @@ -90,7 +90,10 @@ class GitLab(object): r = self.s.post(f'{self.s.api}/projects', data=data) if r.status_code == 201: return r.json() - if r.status_code == 400 and 'still being deleted' in r.text: + if r.status_code == 400 and ( + 'still being deleted' in r.text or + 'has already been taken' in r.text + ): raise GitLab.DeletionInProgress() r.raise_for_status()