1.1 --- a/imiptools/handlers/scheduling/freebusy.py Tue Feb 09 15:57:23 2016 +0100
1.2 +++ b/imiptools/handlers/scheduling/freebusy.py Wed Mar 02 21:17:11 2016 +0100
1.3 @@ -21,8 +21,6 @@
1.4
1.5 from imiptools.data import uri_values
1.6 from imiptools.dates import ValidityError, to_timezone
1.7 -from imiptools.period import coalesce_freebusy, invert_freebusy, \
1.8 - periods_from, remove_periods
1.9
1.10 def schedule_in_freebusy(handler, args, freebusy=None):
1.11
1.12 @@ -117,17 +115,16 @@
1.13 if attendee != handler.user:
1.14 freebusy = handler.get_store().get_freebusy_for_other(handler.user, attendee)
1.15 if freebusy:
1.16 - remove_periods(freebusy, event_periods)
1.17 + freebusy.remove_periods(event_periods)
1.18 busy += freebusy
1.19
1.20 # Obtain the combined busy periods.
1.21
1.22 - busy.sort()
1.23 - busy = coalesce_freebusy(busy)
1.24 + busy = busy.coalesce_freebusy()
1.25
1.26 # Obtain free periods.
1.27
1.28 - free = invert_freebusy(busy)
1.29 + free = busy.invert_freebusy()
1.30 permitted_values = handler.get_permitted_values()
1.31 periods = []
1.32
1.33 @@ -153,7 +150,7 @@
1.34
1.35 # Get free periods from the time of each period.
1.36
1.37 - for found in periods_from(free, period):
1.38 + for found in free.periods_from(period):
1.39
1.40 # Skip any periods before the last period.
1.41