added missing atexit logout for zabbix_host module (#63785)
This commit is contained in:
parent
94e98d5369
commit
9dc94b32d2
1 changed files with 1 additions and 0 deletions
|
@ -742,6 +742,7 @@ def main():
|
|||
zbx = ZabbixAPI(server_url, timeout=timeout, user=http_login_user, passwd=http_login_password,
|
||||
validate_certs=validate_certs)
|
||||
zbx.login(login_user, login_password)
|
||||
atexit.register(zbx.logout)
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Failed to connect to Zabbix server: %s" % e)
|
||||
|
||||
|
|
Loading…
Reference in a new issue