Skip to content

Commit

Permalink
ios cliconf plugin fix regex for version (ansible#40066)
Browse files Browse the repository at this point in the history
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 5cf61d7)
  • Loading branch information
trishnaguha committed May 15, 2018
1 parent 6ee5ff0 commit 1f35062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ansible/plugins/cliconf/ios.py
Expand Up @@ -38,9 +38,9 @@ def get_device_info(self):
reply = self.get(b'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:
Expand Down

0 comments on commit 1f35062

Please sign in to comment.