# HG changeset patch # User Paul Boddie # Date 1431896235 -7200 # Node ID 82b67468afc6a0283b660a188cdbd7f3abb4f4c6 # Parent 1006d95253866e49358285c247b8c053285f8c47 Fixed removal of affected periods. diff -r 1006d9525386 -r 82b67468afc6 imiptools/period.py --- a/imiptools/period.py Sun May 17 22:35:39 2015 +0200 +++ b/imiptools/period.py Sun May 17 22:57:15 2015 +0200 @@ -251,13 +251,15 @@ originally-defined occurrence. """ - found = bisect_left(freebusy, Period(start, start)) + search = Period(start, start) + found = bisect_left(freebusy, search) + while found < len(freebusy): fb = freebusy[found] # Stop looking if the start no longer matches the recurrence identifier. - if fb.get_start_point() != start: + if fb.get_start_point() != search.get_start_point(): return # If the period belongs to the parent object, remove it and return.