From 12c8ed1836df166fcf2b05db57bfb84888481b99 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sun, 19 Feb 2023 16:40:22 +0100 Subject: [PATCH] fix SyntaxWarning 'is not' when checking for equality Signed-off-by: Mikael Arguedas --- smach/src/smach/state_machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smach/src/smach/state_machine.py b/smach/src/smach/state_machine.py index 2b469af..2fe8bd7 100644 --- a/smach/src/smach/state_machine.py +++ b/smach/src/smach/state_machine.py @@ -73,7 +73,7 @@ def __init__(self, outcomes, input_keys=[], output_keys=[]): ### Getter and Setter to allow pickling and unpickling state machines def __getstate__(self): - return {k:v for (k, v) in self.__dict__.items() if k is not "_state_transitioning_lock"} + return {k:v for (k, v) in self.__dict__.items() if k != "_state_transitioning_lock"} def __setstate__(self, d): self.__dict__ = d