mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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
@ -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…
Reference in New Issue
Block a user