# HG changeset patch # User Paul Boddie # Date 1423327118 -3600 # Node ID 4fcc448bb80f8a0d739880c75dad0e16ccd7183d # Parent 8787b25d05858ecfb6bcda8d3afc410fc3d34d45 Handle the absence of slot information for empty days. diff -r 8787b25d0585 -r 4fcc448bb80f imip_manager.py --- a/imip_manager.py Sat Feb 07 17:33:31 2015 +0100 +++ b/imip_manager.py Sat Feb 07 17:38:38 2015 +0100 @@ -979,7 +979,7 @@ # Add empty days. - add_empty_days(days, partitioned, tzid) + add_empty_days(days, tzid) # Show the controls permitting day selection. @@ -1127,7 +1127,7 @@ # Some rows contain no period details and are marked as such. - have_active = reduce(lambda x, y: x or y, [slots.get(point) for slots in groups], None) + have_active = reduce(lambda x, y: x or y, [slots and slots.get(point) for slots in groups], None) css = " ".join( ["slot"] + diff -r 8787b25d0585 -r 4fcc448bb80f imiptools/period.py --- a/imiptools/period.py Sat Feb 07 17:33:31 2015 +0100 +++ b/imiptools/period.py Sat Feb 07 17:38:38 2015 +0100 @@ -285,7 +285,7 @@ return d -def add_empty_days(days, partitioned, tzid): +def add_empty_days(days, tzid): "Add empty days to 'days' between busy days." @@ -298,7 +298,6 @@ empty_day = last_day + timedelta(1) while empty_day < day: days[empty_day] = [(get_start_of_day(empty_day, tzid), None)] - partitioned[empty_day] = {} empty_day += timedelta(1) last_day = day