!17502 fix report error if the length of hwts data is less than 64

From: @yanghaitao1
Reviewed-by: @yelihua,@ouwenchang
Signed-off-by: @ouwenchang
This commit is contained in:
mindspore-ci-bot 2021-06-02 17:11:35 +08:00 committed by Gitee
commit 4729bb1c58
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])