imip-agent

Change of imipweb/event.py

620:6338539a488e
imipweb/event.py
     1.1 --- a/imipweb/event.py	Wed Jul 29 18:41:11 2015 +0200
     1.2 +++ b/imipweb/event.py	Thu Jul 30 18:28:43 2015 +0200
     1.3 @@ -165,7 +165,7 @@
     1.4  
     1.5                  to_unschedule = self.get_removed_periods()
     1.6  
     1.7 -                self.set_period_in_object(obj, period)
     1.8 +                obj.set_period(period)
     1.9                  self.set_periods_in_object(obj, periods)
    1.10  
    1.11                  # Update summary.
    1.12 @@ -234,14 +234,6 @@
    1.13  
    1.14          return None
    1.15  
    1.16 -    def set_period_in_object(self, obj, period):
    1.17 -
    1.18 -        "Set in the given 'obj' the given 'period' as the main start and end."
    1.19 -
    1.20 -        result = self.set_datetime_in_object(period.get_start(), period.start_attr and period.start_attr.get("TZID"), "DTSTART", obj)
    1.21 -        result = self.set_datetime_in_object(period.get_end(), period.end_attr and period.end_attr.get("TZID"), "DTEND", obj) or result
    1.22 -        return result
    1.23 -
    1.24      def set_periods_in_object(self, obj, periods):
    1.25  
    1.26          "Set in the given 'obj' the given 'periods'."
    1.27 @@ -263,20 +255,6 @@
    1.28          # NOTE: To do: calculate the update status.
    1.29          return update
    1.30  
    1.31 -    def set_datetime_in_object(self, dt, tzid, property, obj):
    1.32 -
    1.33 -        """
    1.34 -        Set 'dt' and 'tzid' for the given 'property' in 'obj', returning whether
    1.35 -        an update has occurred.
    1.36 -        """
    1.37 -
    1.38 -        if dt:
    1.39 -            old_value = obj.get_value(property)
    1.40 -            obj[property] = [get_datetime_item(dt, tzid)]
    1.41 -            return format_datetime(dt) != old_value
    1.42 -
    1.43 -        return False
    1.44 -
    1.45      def handle_main_period(self):
    1.46  
    1.47          "Return period details for the main start/end period in an event."