Skip to content

Commit

Permalink
don't have to worry about apiaddresses empty list
Browse files Browse the repository at this point in the history
This is falsy so it's caught by the 'if not api_addresses' check.
  • Loading branch information
barrettj12 committed Nov 8, 2023
1 parent 0b259f5 commit cc9a173
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ def api_port(self) -> str:
raise AgentConfException("agent.conf key 'apiaddresses' missing")
if not isinstance(api_addresses, List):
raise AgentConfException("agent.conf key 'apiaddresses' is not a list")
if len(api_addresses) == 0:
raise AgentConfException("agent.conf key 'apiaddresses' is empty list")

return api_addresses[0].split(':')[1]

Expand Down

0 comments on commit cc9a173

Please sign in to comment.