From 44cd072e37f91d8523080efbd66461b58595f10f Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Thu, 18 May 2017 00:22:29 +0200 Subject: [PATCH] Fix invalid string comparison (luckily Python 2.7 did not intern those strings making the tests fail) --- scour/scour.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scour/scour.py b/scour/scour.py index 8c0bc73..11791c2 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -2439,7 +2439,7 @@ def cleanPath(element, options): coordIndex += 1 # l expects two parameters and we start drawing with the first (so we need at least 4) - elif cmd is 'l' and len(data) >= 4: + elif cmd == 'l' and len(data) >= 4: coordIndex = 0 while coordIndex+2 < len(data): if is_same_direction(*data[coordIndex:coordIndex+4]): @@ -2452,7 +2452,7 @@ def cleanPath(element, options): coordIndex += 2 # m expects two parameters but we have to skip the first pair as it's not drawn (so we need at least 6) - elif cmd is 'm' and len(data) >= 6: + elif cmd == 'm' and len(data) >= 6: coordIndex = 2 while coordIndex+2 < len(data): if is_same_direction(*data[coordIndex:coordIndex+4]):