Skip to content

Commit

Permalink
[Mellanox] Fix truncated manufacture date returned from platform API (#…
Browse files Browse the repository at this point in the history
…5473)

The manufacture date returned from platform API was truncated, time is not included. Revise the regular expression used for matching.
  • Loading branch information
keboliu authored and abdosi committed Oct 6, 2020
1 parent 969f77c commit 8c3dbce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _load_eeprom(self):

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')
Expand Down

0 comments on commit 8c3dbce

Please sign in to comment.