mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-08 11:43:10 +00:00
Handle Duplex parsing on some version of iosxr (#38738)
* Handle Duplex parsing on some version of iosxr * use re noncapture group for multiple match as suggested by Eric
This commit is contained in:
@@ -307,7 +307,7 @@ class Interfaces(FactsBase):
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user