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.
This commit is contained in:
HexPandaa 2021-04-02 17:04:36 +02:00 committed by GitHub
parent f4c11111a7
commit 3d9147f36c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ else:
def StructWithLenPython2or3(endian,data):
#Python2...
if PY2OR3 is "PY2":
if PY2OR3 == "PY2":
return struct.pack(endian, data)
#Python3...
else: