Changeset View
Changeset View
Standalone View
Standalone View
pykolab/xml/event.py
Show First 20 Lines • Show All 874 Lines • ▼ Show 20 Lines | def set_from_ical(self, attr, value): | ||||
params = value.params if hasattr(value, 'params') else {} | params = value.params if hasattr(value, 'params') else {} | ||||
if isinstance(value, icalendar.vDDDTypes) and hasattr(value, 'dt'): | if isinstance(value, icalendar.vDDDTypes) and hasattr(value, 'dt'): | ||||
value = value.dt | value = value.dt | ||||
if attr == "categories": | if attr == "categories": | ||||
self.add_category(value) | self.add_category(value) | ||||
elif attr == "class": | elif attr == "class": | ||||
if (value and value[:2] not in ['X-', 'x-']): | |||||
self.set_classification(value) | self.set_classification(value) | ||||
elif attr == "recurrenceid": | elif attr == "recurrenceid": | ||||
self.set_ical_recurrenceid(value, params) | self.set_ical_recurrenceid(value, params) | ||||
elif hasattr(self, ical_setter): | elif hasattr(self, ical_setter): | ||||
getattr(self, ical_setter)(value) | getattr(self, ical_setter)(value) | ||||
elif hasattr(self, default_setter): | elif hasattr(self, default_setter): | ||||
getattr(self, default_setter)(value) | getattr(self, default_setter)(value) | ||||
def set_ical_attendee(self, _attendee): | def set_ical_attendee(self, _attendee): | ||||
▲ Show 20 Lines • Show All 618 Lines • Show Last 20 Lines |