From 9cc2ad1eaf941d8ed3b5542a3d5cdfccec7ba60b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Dec 2018 11:35:45 +1100 Subject: Fix invalid string comparisons Identity checks should never be used with strings, it may fail based on Python's interning logic. --- development_iskeyfree.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'development_iskeyfree.py') diff --git a/development_iskeyfree.py b/development_iskeyfree.py index 7851afee..332e11d4 100644 --- a/development_iskeyfree.py +++ b/development_iskeyfree.py @@ -105,18 +105,18 @@ class MyChecker(): cls.mylist.clear() for e in sortkeys: cmd = "" - if e[2] is not "": + if e[2] != "": cmd += e[2] + "+" - if e[3] is not "": + if e[3] != "": cmd += e[3] + "+" - if e[4] is not "": + if e[4] != "": cmd += e[4] + "+" - if e[5] is not "": + if e[5] != "": cmd += e[5] + "+" cmd += e[1] - if e[6] is not "": + if e[6] != "": cmd += " " + e[6] cls.mylist.append([e[0], cmd]) -- cgit v1.2.3