1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #4366 from skyl/GenericBsd-get_default_interfaces

fixes 4365 - Mac with cisco vpn client, GenericBsdIfconfigNetwork get_default_interfaces fails with index out of range
This commit is contained in:
Michael DeHaan 2013-10-04 05:56:04 -07:00
commit a74c0091b2

View file

@ -1576,7 +1576,7 @@ class GenericBsdIfconfigNetwork(Network):
for line in lines: for line in lines:
words = line.split() words = line.split()
# Collect output from route command # Collect output from route command
if len(words) > 0: if len(words) > 1:
if words[0] == 'interface:': if words[0] == 'interface:':
interface[v]['interface'] = words[1] interface[v]['interface'] = words[1]
if words[0] == 'gateway:': if words[0] == 'gateway:':