Skip to content
Snippets Groups Projects

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

Merged Samuel GAIST requested to merge 64_do_not_fail_when_listing_environment into master
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -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():
Loading