From 098a62335b3b695ee409363d429ac07284de7138 Mon Sep 17 00:00:00 2001 From: Viktor Seifert Date: Fri, 22 Jul 2022 14:42:22 +0200 Subject: [PATCH] RED-4653: Added a descriptive error message when the storage endpoint is nor a correct url --- pyinfra/storage/adapters/s3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyinfra/storage/adapters/s3.py b/pyinfra/storage/adapters/s3.py index 46b5c2b..dab3ec8 100644 --- a/pyinfra/storage/adapters/s3.py +++ b/pyinfra/storage/adapters/s3.py @@ -65,6 +65,8 @@ def _parse_endpoint(endpoint): if url(endpoint): parsed_url = urlparse(endpoint) return {"secure": parsed_url.scheme == "https", "endpoint": parsed_url.netloc} + else: + raise f"The configured storage endpoint is not a valid url: {endpoint}" def get_s3_storage(config: Config):