Commit 7c06da5b authored by Rye Terrell's avatar Rye Terrell

prevent unsetting of nonexistent previous port in kubeapi-load-balancer charm

parent ce91f2ab
......@@ -54,6 +54,8 @@ def request_server_certificates(tls):
def close_old_port():
config = hookenv.config()
old_port = config.previous('port')
if not old_port:
return
try:
hookenv.close_port(old_port)
except CalledProcessError:
......
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