diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py index ad35c5a72..92adf1d7c 100644 --- a/napalm/ios/ios.py +++ b/napalm/ios/ios.py @@ -3612,7 +3612,10 @@ def get_network_instances(self, name=""): first_part = vrf.split("Address family")[0] # retrieve the name of the VRF and the Route Distinguisher - vrf_name, RD = re.match(r"^VRF (\S+).*RD (.*);", first_part).groups() + match = re.match(r"^VRF (\S+).*RD (.*);", first_part) + if not match: + return instances + vrf_name, RD = match.groups() if RD == "": RD = ""