From 82df0a5457352ad950d0fdc82d0709e0a60904a9 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 7 Feb 2017 21:41:35 +0800 Subject: [PATCH] THCI: fix process line count issue in getCommissioningLogs method (#1266) --- tools/harness-thci/OpenThread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/harness-thci/OpenThread.py b/tools/harness-thci/OpenThread.py index f0d9d6d97..8b2e52ad4 100644 --- a/tools/harness-thci/OpenThread.py +++ b/tools/harness-thci/OpenThread.py @@ -2037,8 +2037,9 @@ class OpenThread(IThci): else PlatformDiagnosticPacket_Type.JOIN_ENT_rsp if 'JOIN_ENT.rsp' in infoValue \ else PlatformDiagnosticPacket_Type.UNKNOWN elif "len" in infoType: + bytesInEachLine = 16 EncryptedPacket.TLVsLength = int(infoValue) - payloadLineCount = int(infoValue)/16 + 1 + payloadLineCount = (int(infoValue) + bytesInEachLine - 1)/bytesInEachLine while payloadLineCount > 0: payloadLineCount = payloadLineCount - 1 payloadLine = rawLogs.get()