[Mellanox] Fix truncated manufacture date returned from platform API (#5473)

The manufacture date returned from platform API was truncated, time is not included. Revise the regular expression used for matching.
This commit is contained in:
Kebo Liu 2020-10-04 01:17:13 +08:00 committed by Abhishek Dosi
parent 969f77cf3e
commit 8c3dbce209

View File

@ -101,7 +101,7 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
for line in lines:
try:
match = re.search('(0x[0-9a-fA-F]{2})([\s]+[\S]+[\s]+)([\S]+)', line)
match = re.search('(0x[0-9a-fA-F]{2})([\s]+[\S]+[\s]+)([\S]+[\s]*[\S]*)', line)
if match is not None:
idx = match.group(1)
value = match.group(3).rstrip('\0')