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:
parent
8173602a34
commit
bdd105f740
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue