Skip to content

Commit

Permalink
FIX: Ignore exception if attempted deletion fails (fixes #817)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Warner (Mac) committed Feb 28, 2015
1 parent 3f6d9fa commit d5462a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion skimage/measure/_find_contours.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
pass
del contours[tail_num]
# remove the old end of head and add the new end.
del ends[from_point]
Expand Down

0 comments on commit d5462a2

Please sign in to comment.