[thci] fix THCI for T1.1 9.2.4 commissioner (#7311)

During running T.1.1 tests with the T.1.2 capable sample it turned out
that 9.2.4 commissioner TC is not working when using the device that
is T.1.2 capable. The reason is that in MGMT_ACTIVE_SET
listSecurityPolicy list has only two elements and we are entering the
code, where we assume it is three element, which raises IndexError.
This commit is contained in:
tomaszkob89
2022-01-13 10:38:49 -08:00
committed by GitHub
parent 26acccc105
commit bb658e2705
+2 -5
View File
@@ -2825,11 +2825,8 @@ class OpenThreadTHCI(object):
# new passing way listSecurityPolicy=[3600, 0b11001111]
rotationTime = listSecurityPolicy[0]
# bit order
if TESTHARNESS_VERSION == TESTHARNESS_1_2:
if self.DeviceCapability != DevCapb.V1_1:
policyBits = listSecurityPolicy[2] << 8 | listSecurityPolicy[1]
else:
policyBits = listSecurityPolicy[1]
if len(listSecurityPolicy) > 2:
policyBits = listSecurityPolicy[2] << 8 | listSecurityPolicy[1]
else:
policyBits = listSecurityPolicy[1]