From 3d9147f36c8967a9db63be7732b52c3d9ad0d391 Mon Sep 17 00:00:00 2001 From: HexPandaa <47880094+HexPandaa@users.noreply.github.com> Date: Fri, 2 Apr 2021 17:04:36 +0200 Subject: [PATCH] Compare strings with `==` instead of `is` `==` should be used when comparing values, `is` should be used to compare identities. Modern versions of Python throw a SyntaxWarning. --- tools/MultiRelay/RelayMultiPackets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/MultiRelay/RelayMultiPackets.py b/tools/MultiRelay/RelayMultiPackets.py index 2aa164e..095059b 100644 --- a/tools/MultiRelay/RelayMultiPackets.py +++ b/tools/MultiRelay/RelayMultiPackets.py @@ -45,7 +45,7 @@ else: def StructWithLenPython2or3(endian,data): #Python2... - if PY2OR3 is "PY2": + if PY2OR3 == "PY2": return struct.pack(endian, data) #Python3... else: