skip if hwts data is less than 64

This commit is contained in:
yanghaitao1 2021-06-01 04:06:45 -04:00
parent 5db0e92794
commit 44defdc265
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ class HWTSLogParser:
if line:
if not line.strip():
continue
if len(line) < 64:
logger.warning("Length of hwts data is less than 64")
continue
else:
break
byte_first_four = struct.unpack('BBHHH', line[0:8])