ios cliconf plugin fix regex for version (#40066)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
pull/38522/head
Trishna Guha 7 years ago committed by GitHub
parent 0407c51447
commit 5cf61d7401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,9 +38,9 @@ class Cliconf(CliconfBase):
reply = self.get('show version')
data = to_text(reply, errors='surrogate_or_strict').strip()
match = re.search(r'Version (\S+),', data)
match = re.search(r'Version (\S+)', data)
if match:
device_info['network_os_version'] = match.group(1)
device_info['network_os_version'] = match.group(1).strip(',')
match = re.search(r'^Cisco (.+) \(revision', data, re.M)
if match:

Loading…
Cancel
Save