Skip to content

Commit

Permalink
Handle Duplex parsing on some version of iosxr (ansible#38738)
Browse files Browse the repository at this point in the history
* Handle Duplex parsing on some version of iosxr

* use re noncapture group for multiple match as suggested by Eric
  • Loading branch information
gdpak authored Apr 18, 2018
1 parent 8173602 commit bdd105f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/iosxr/iosxr_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def parse_bandwidth(self, data):
return int(match.group(1))

def parse_duplex(self, data):
match = re.search(r'(\w+) Duplex', data, re.M)
match = re.search(r'(\w+)(?: D|-d)uplex', data, re.M)
if match:
return match.group(1)

Expand Down

0 comments on commit bdd105f

Please sign in to comment.