I have the following function, when I call it's printing out the mess but if the if condition is false than it's not going the else branch, what I'm doing wrong?
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(). Shouldn't that beraiseError()?elsecondition is probably connected with your innerif. Check your indentation.