Changeset View
Changeset View
Standalone View
Standalone View
pykolab/xml/todo.py
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | def __init__(self, from_ical="", from_string=""): | ||||
if from_string == "": | if from_string == "": | ||||
self.event = kolabformat.Todo() | self.event = kolabformat.Todo() | ||||
else: | else: | ||||
self.event = kolabformat.readTodo(from_string, False) | self.event = kolabformat.readTodo(from_string, False) | ||||
self._load_attendees() | self._load_attendees() | ||||
else: | else: | ||||
self.from_ical(from_ical, from_string) | self.from_ical(from_ical, from_string) | ||||
self.set_created(self.get_created()) | |||||
self.uid = self.get_uid() | self.uid = self.get_uid() | ||||
def from_ical(self, ical, raw): | def from_ical(self, ical, raw): | ||||
if isinstance(ical, icalendar.Todo): | if isinstance(ical, icalendar.Todo): | ||||
ical_todo = ical | ical_todo = ical | ||||
elif hasattr(icalendar.Todo, 'from_ical'): | elif hasattr(icalendar.Todo, 'from_ical'): | ||||
ical_todo = icalendar.Todo.from_ical(ical) | ical_todo = icalendar.Todo.from_ical(ical) | ||||
elif hasattr(icalendar.Todo, 'from_string'): | elif hasattr(icalendar.Todo, 'from_string'): | ||||
▲ Show 20 Lines • Show All 192 Lines • Show Last 20 Lines |