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

This commit is contained in:
Rye Terrell 2017-07-17 12:22:54 -05:00
parent ce91f2ab26
commit 7c06da5b0e

View File

@ -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: