私はそれが混乱を印刷すると呼び出すときに私は次の機能を持っていますが、if
の条件が偽である場合は、それ以外のブランチに行くのではない、私は間違っている?他の場合は、
def lidarMessageHandler(self, mess):
print(mess);
#Check if I received the right command
if(COMMANDTABLE[commandList[self.clientname]['lastcommand']]['id'] == mess['commandName']):
print('if')
#Check if it's a blocking command
commandList[self.clientname]['isready'] = True
if(self.start):
self.waitingForSettingsHandler(mess)
return
else:
error = "I waited the answer for the following command %s but I received % command from %s " % self.lastCommand, mess['commandName'], self.clientname
self.reiseError(error)
isRunning[self.clientname] = False
print('else');
有効です。私が見る奇妙なことは、 'reiseError()'だけです。それは 'raiseError()'ではありませんか? –
あなたの 'else'条件はあなたの内側の' if'とおそらく接続しています。押し込みを確認してください。 –
@Paolo:あなたが正しいと思います。識別は最初に8であり、内側のレベルでは4になります。 –