Commit 00b66858 authored by Samuel GAIST's avatar Samuel GAIST

[environments] Do not fail if the platform cannot be reached

This makes the behaviour consistant with the local discovery of
environments.
parent 1f42b706
Pipeline #36621 passed with stage
in 8 minutes and 5 seconds
......@@ -50,8 +50,12 @@ logger = logging.getLogger(__name__)
def get_remote_environments(ctx):
config = ctx.meta.get("config")
with common.make_webapi(config) as webapi:
return webapi.get("/api/v1/backend/environments/")
try:
with common.make_webapi(config) as webapi:
return webapi.get("/api/v1/backend/environments/")
except Exception as e:
logger.error("Failed to connect to platform: {}".format(e))
return {}
def get_docker_environments():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment