1.1 --- a/imiptools/period.py Fri Jan 30 13:30:57 2015 +0100
1.2 +++ b/imiptools/period.py Fri Jan 30 16:13:25 2015 +0100
1.3 @@ -199,7 +199,7 @@
1.4
1.5 new_slots = []
1.6 current_date = None
1.7 - previously_active = None
1.8 + previously_active = []
1.9
1.10 for point, active in slots:
1.11 start_of_day = get_start_of_day(point)
1.12 @@ -213,7 +213,7 @@
1.13
1.14 # Add any continuing periods.
1.15
1.16 - if point != start_of_day and previously_active:
1.17 + if point != start_of_day:
1.18 new_slots.append((start_of_day, previously_active))
1.19
1.20 # Add the currently active periods at this point in time.