diff --git a/src/charm.py b/src/charm.py index c00ca91..4b2c580 100755 --- a/src/charm.py +++ b/src/charm.py @@ -129,7 +129,7 @@ def api_port(self) -> str: if not isinstance(api_addresses, List): raise AgentConfException("agent.conf key 'apiaddresses' is not a list") - return api_addresses[0].split(':')[1] + return api_addresses[0].split(':')[-1] def ca_cert(self) -> str: """Return the controller's CA certificate."""