mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't fail if host_to_ips returns None.
This commit is contained in:
parent
f625e6d3a9
commit
87c2e93e40
2 changed files with 12 additions and 10 deletions
|
@ -1042,12 +1042,13 @@ def master(master=None, connected=True):
|
|||
if master is not None:
|
||||
master_ips = _host_to_ips(master)
|
||||
|
||||
ips = _remote_port_tcp(port)
|
||||
master_connection_status = False
|
||||
for master_ip in master_ips:
|
||||
if master_ip in ips:
|
||||
master_connection_status = True
|
||||
break
|
||||
if master_ips:
|
||||
ips = _remote_port_tcp(port)
|
||||
for master_ip in master_ips:
|
||||
if master_ip in ips:
|
||||
master_connection_status = True
|
||||
break
|
||||
|
||||
if master_connection_status is not connected:
|
||||
event = salt.utils.event.get_event('minion', opts=__opts__, listen=False)
|
||||
|
|
|
@ -342,12 +342,13 @@ def master(master=None, connected=True):
|
|||
if master is not None:
|
||||
master_ips = _host_to_ips(master)
|
||||
|
||||
ips = _win_remotes_on(port)
|
||||
master_connection_status = False
|
||||
for master_ip in master_ips:
|
||||
if master_ip in ips:
|
||||
master_connection_status = True
|
||||
break
|
||||
if master_ips:
|
||||
ips = _win_remotes_on(port)
|
||||
for master_ip in master_ips:
|
||||
if master_ip in ips:
|
||||
master_connection_status = True
|
||||
break
|
||||
|
||||
if master_connection_status is not connected:
|
||||
event = salt.utils.event.get_event('minion', opts=__opts__, listen=False)
|
||||
|
|
Loading…
Add table
Reference in a new issue