Allow the zk_conn to be none properly
This commit is contained in:
parent
2a5106fa92
commit
c8c5d6f884
|
@ -42,8 +42,9 @@ zk_host = ''
|
||||||
|
|
||||||
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'], max_content_width=120)
|
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'], max_content_width=120)
|
||||||
|
|
||||||
def cleanup(retcode, retmsg, zk_conn):
|
def cleanup(retcode, retmsg, zk_conn=None):
|
||||||
pvc_common.stopZKConnection(zk_conn)
|
if zk_conn:
|
||||||
|
pvc_common.stopZKConnection(zk_conn)
|
||||||
if retcode == True:
|
if retcode == True:
|
||||||
if retmsg != '':
|
if retmsg != '':
|
||||||
click.echo(retmsg)
|
click.echo(retmsg)
|
||||||
|
|
Loading…
Reference in New Issue