Fixes #20443 - Adjust version checking regex to account fo no comma in IOS-XE (#29157)

* Adjust version checking regex to account fo no comma in IOS-XE
* Adjusted regex to include last character of version number

(cherry picked from commit e5d247fdc0)
pull/29591/head
Jonathan Karras 8 years ago committed by Toshio Kuratomi
parent 18db4089a7
commit 54cfca0ea3

@ -184,7 +184,7 @@ class Default(FactsBase):
self.facts['hostname'] = self.parse_hostname(data)
def parse_version(self, data):
match = re.search(r'Version (\S+),', data)
match = re.search(r'Version (\S+?)(?:,\s|\s)', data)
if match:
return match.group(1)

Loading…
Cancel
Save