Merge pull request #1397 from JDWarner/fix_find_contours

FIX: Ignore exception if attempted deletion fails (fixes #817)
This commit is contained in:
Steven Silvester
2015-02-28 19:29:42 -06:00
+4 -1
View File
@@ -167,7 +167,10 @@ def _assemble_contours(points_iterator):
head.extend(tail)
# remove all traces of tail:
del starts[to_point]
del ends[tail[-1]]
try:
del ends[tail[-1]]
except KeyError:
pass
del contours[tail_num]
# remove the old end of head and add the new end.
del ends[from_point]