From f067e871ea0dec3a3a6c719e85dc0e3d89fd3245 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Tue, 2 May 2023 14:48:11 +0100 Subject: [PATCH] Better error message when unable to connect to container --- nf_core/modules/lint/main_nf.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index 703dba18a0..102d5ead12 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -332,23 +332,13 @@ def check_process_section(self, lines, fix_version, progress_bar): self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf)) continue if not response.ok: - if response.status_code in [400, 401, 402, 403]: - self.warned.append( - ( - "container_links", - f"Access to container {response.url} denied, status code: {response.status_code}", - self.main_nf, - ) - ) - - else: - self.failed.append( - ( - "container_links", - f"Unable to connect to {response.url}, status code: {response.status_code}", - self.main_nf, - ) + self.failed.append( + ( + "container_links", + f"Unable to connect to {response.url}, status code: {response.status_code}", + self.main_nf, ) + ) # Check that all bioconda packages have build numbers # Also check for newer versions