diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py index 964a912fe..fd522cc52 100644 --- a/napalm/ios/ios.py +++ b/napalm/ios/ios.py @@ -884,10 +884,10 @@ def get_facts(self): except ValueError: # Handle 'Cisco IOS Software [Denali],' _, os_version = re.split(r"Cisco IOS Software \[.*?\], ", line) - os_version = os_version.strip() - elif re.search(r"IOS (tm).+Software", line): + elif re.search(r"IOS \(tm\).+Software", line): _, os_version = line.split("IOS (tm) ") - os_version = os_version.strip() + + os_version = os_version.strip() # Determine domain_name and fqdn for line in show_hosts.splitlines():