diff --git a/lib/ansible/module_utils/network/ios/facts/vlans/vlans.py b/lib/ansible/module_utils/network/ios/facts/vlans/vlans.py index 0450ad9a39..b499be5ce9 100644 --- a/lib/ansible/module_utils/network/ios/facts/vlans/vlans.py +++ b/lib/ansible/module_utils/network/ios/facts/vlans/vlans.py @@ -111,7 +111,7 @@ class VlansFacts(object): config = deepcopy(spec) if vlan_info == 'Name' and 'Name' not in conf: - conf = filter(None, conf.split(' ')) + conf = list(filter(None, conf.split(' '))) config['vlan_id'] = int(conf[0]) config['name'] = conf[1] if len(conf[2].split('/')) > 1: @@ -127,7 +127,7 @@ class VlansFacts(object): config['state'] = 'active' config['shutdown'] = 'disabled' elif vlan_info == 'Type' and 'Type' not in conf: - conf = filter(None, conf.split(' ')) + conf = list(filter(None, conf.split(' '))) config['mtu'] = int(conf[3]) elif vlan_info == 'Remote': if len(conf.split(',')) > 1 or conf.isdigit():