Commit 69359bab authored by Chris Lamb's avatar Chris Lamb 💬

Compare None using identify, not equality.

parent 6d32c7b0
......@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
def perform_fuzzy_matching(members1, members2):
if tlsh == None or Config().fuzzy_threshold == 0:
if tlsh is None or Config().fuzzy_threshold == 0:
return
already_compared = set()
# Perform local copies because they will be modified by consumer
......
......@@ -448,13 +448,13 @@ class SideBySideDiff(object):
orig1 = s1
orig2 = s2
if s1 == None and s2 == None:
if s1 is None and s2 is None:
type_name = "unmodified"
elif s1 == "" and s2 == "":
type_name = "unmodified"
elif s1 == None or s1 == "":
elif s1 is None or s1 == "":
type_name = "added"
elif s2 == None or s2 == "":
elif s2 is None or s2 == "":
type_name = "deleted"
elif orig1 == orig2 and not s1.endswith('lines removed ]') and not s2.endswith('lines removed ]'):
type_name = "unmodified"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment