mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
network.routes should not raise exception if no interface (#37794)
* network.routes should not raise exception if no interface * use >= instead of ==
This commit is contained in:
parent
628c4a3d27
commit
c66b51b9b9
1 changed files with 2 additions and 2 deletions
|
@ -490,7 +490,7 @@ def _netstat_route_sunos():
|
|||
'gateway': comps[1],
|
||||
'netmask': '',
|
||||
'flags': comps[2],
|
||||
'interface': comps[5]})
|
||||
'interface': comps[5] if len(comps) >= 6 else ''})
|
||||
cmd = 'netstat -f inet6 -rn | tail -n+5'
|
||||
out = __salt__['cmd.run'](cmd, python_shell=True)
|
||||
for line in out.splitlines():
|
||||
|
@ -501,7 +501,7 @@ def _netstat_route_sunos():
|
|||
'gateway': comps[1],
|
||||
'netmask': '',
|
||||
'flags': comps[2],
|
||||
'interface': comps[5]})
|
||||
'interface': comps[5] if len(comps) >= 6 else ''})
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue