Skip to content

Commit cd9031a

Browse files
Change equality comparison to identity comparison (#11)
1 parent df2af62 commit cd9031a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/StateMachine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self, xml_file : str):
1414

1515
def __CheckConditions(self,conditions):
1616
all_conditions_satisfied = True
17-
if(conditions != None):
17+
if(conditions is not None):
1818
_conditions = conditions.conditions
1919
for condition in _conditions:
2020
module,expression = self.__PrepareExpression(condition.expression)
@@ -42,7 +42,7 @@ def __CheckConditions(self,conditions):
4242

4343
def __ExecActions(self,actions):
4444
all_action_executed = True
45-
if(actions != None):
45+
if(actions is not None):
4646
_actions = actions.actions
4747
for action in _actions:
4848
module,expression = self.__PrepareExpression(action.expression)
@@ -79,7 +79,7 @@ def get_current_state(self):
7979
return self.current_state
8080

8181
def LoadStateMachine(self):
82-
if (self.states != None):
82+
if (self.states is not None):
8383
logging.error("State Machine already loaded")
8484
else:
8585
self.xml_file

0 commit comments

Comments
 (0)