Commit 39e9ddf1 authored by André Anjos's avatar André Anjos 💬

Merge branch '64_do_not_fail_when_listing_environment' into 'master'

Do not fail if the platform cannot be reached when listing environments

Closes #64

See merge request !83
parents 1f42b706 00b66858
Pipeline #36623 passed with stages
in 5 minutes and 9 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