THCI: clean up bugs found during testing and detected by pylint. (#861)

This commit is contained in:
Xiao Ma
2016-10-21 21:52:44 -07:00
committed by Jonathan Hui
parent c2238638bd
commit 919e902e18
+6 -11
View File
@@ -1843,7 +1843,7 @@ class ARM(IThci):
print cmd
if self.__sendCommand(cmd)[0] == 'Done':
if self.logThreadStatus == self.logStatus['stop']:
self.logThread = ThreadRunner.run(target = self.__readCommissioningLogs, args = (120,))
self.logThread = ThreadRunner.run(target=self.__readCommissioningLogs, args=(120,))
return True
else:
return False
@@ -2105,17 +2105,11 @@ class ARM(IThci):
if listChannelMask != None:
cmd += ' channelmask '
print listChannelMask
entry = self.__convertLongToString(self.__convertChannelMask(listChannelMask))
cmd += str(hex(1 << listChannelMask[1]))
if len(entry) < 8:
entry = entry.zfill(8)
cmd += '0x' + entry
if sPSKc != None or listSecurityPolicy != None \
xCommissioningSessionId != None or xTmfPort != None or xSteeringData != None or xBorderRouterLocator != None or \
BogusTLV != None:
if sPSKc != None or listSecurityPolicy != None or \
xCommissioningSessionId != None or xTmfPort != None or xSteeringData != None or xBorderRouterLocator != None or \
BogusTLV != None:
cmd += ' binary '
if sPSKc != None:
@@ -2330,6 +2324,7 @@ class ARM(IThci):
def setPSKc(self, strPSKc):
print '%s call setPSKc' % self.port
return
try:
cmd = 'dataset pskc %s' % strPSKc
print cmd