imip-agent

Change of imipweb/event.py

627:23f998c9dacd
imipweb/event.py
     1.1 --- a/imipweb/event.py	Sat Aug 01 01:25:21 2015 +0200
     1.2 +++ b/imipweb/event.py	Sat Aug 01 01:35:03 2015 +0200
     1.3 @@ -22,7 +22,7 @@
     1.4  from datetime import date, timedelta
     1.5  from imiptools.data import get_uri, uri_dict, uri_values
     1.6  from imiptools.dates import format_datetime, get_datetime_item, \
     1.7 -                            get_period_item, to_date, to_timezone
     1.8 +                            to_date, to_timezone
     1.9  from imiptools.mail import Messenger
    1.10  from imiptools.period import have_conflict
    1.11  from imipweb.data import EventPeriod, \
    1.12 @@ -166,7 +166,7 @@
    1.13                  to_unschedule = self.get_removed_periods()
    1.14  
    1.15                  obj.set_period(period)
    1.16 -                self.set_periods_in_object(obj, periods)
    1.17 +                obj.set_periods(periods)
    1.18  
    1.19                  # Update summary.
    1.20  
    1.21 @@ -234,27 +234,6 @@
    1.22  
    1.23          return None
    1.24  
    1.25 -    def set_periods_in_object(self, obj, periods):
    1.26 -
    1.27 -        "Set in the given 'obj' the given 'periods'."
    1.28 -
    1.29 -        update = False
    1.30 -
    1.31 -        old_values = obj.get_values("RDATE")
    1.32 -        new_rdates = []
    1.33 -
    1.34 -        if obj.has_key("RDATE"):
    1.35 -            del obj["RDATE"]
    1.36 -
    1.37 -        for p in periods:
    1.38 -            if p.origin != "RRULE":
    1.39 -                new_rdates.append(get_period_item(p.get_start(), p.get_end(), p.get_tzid()))
    1.40 -
    1.41 -        obj["RDATE"] = new_rdates
    1.42 -
    1.43 -        # NOTE: To do: calculate the update status.
    1.44 -        return update
    1.45 -
    1.46      def handle_main_period(self):
    1.47  
    1.48          "Return period details for the main start/end period in an event."