From 639f6bee335e0f68ed6ce08bbb9934b182cc46fe Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 24 Jan 2012 00:29:44 +0100 Subject: Fixup event descriptions (again :S ) --- sublab_project/calendarium/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sublab_project/calendarium/tasks.py b/sublab_project/calendarium/tasks.py index a2639dc..d0ab16d 100644 --- a/sublab_project/calendarium/tasks.py +++ b/sublab_project/calendarium/tasks.py @@ -46,7 +46,8 @@ class CalendariumImport(PeriodicTask): event_info = {} for fieldinfo in event_fields: try: - event_info[fieldinfo[0]] = event[fieldinfo[1]].format() + event_info[fieldinfo[0]] = event[fieldinfo[1]].format().encode("utf-8") + event_info[fieldinfo[0]] = event_info[fieldinfo[0]].decode("string-escape") except KeyError: event_info[fieldinfo[0]] = fieldinfo[2] start = icalendar.vDatetime.from_ical(event['dtstart'].ical()) -- cgit v1.2.1