From b4c4e3a79d3029501bf91dca90f484cfb6951200 Mon Sep 17 00:00:00 2001 From: Chen Yudong Date: Fri, 21 Jan 2022 13:36:11 +0800 Subject: [PATCH] ci: do not retry on 404 when LOCAL_GITLAB_HTTPS_HOST not set --- tools/ci/python_packages/gitlab_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/python_packages/gitlab_api.py b/tools/ci/python_packages/gitlab_api.py index bd5322cf3d..ba2b5e4ef3 100644 --- a/tools/ci/python_packages/gitlab_api.py +++ b/tools/ci/python_packages/gitlab_api.py @@ -29,7 +29,7 @@ def retry(func: TR) -> TR: if e.response_code == 500: # retry on this error pass - elif e.response_code == 404: + elif e.response_code == 404 and os.environ.get('LOCAL_GITLAB_HTTPS_HOST', None): # remove the environment variable "LOCAL_GITLAB_HTTPS_HOST" and retry os.environ.pop('LOCAL_GITLAB_HTTPS_HOST', None) else: