[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 GitHub
parent 32a517f583
commit 40623681bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,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')