[conduit/tracker] Fix ical to ncal conversion



commit 078ddf4ddb871b8e60c1a1eb69799e5cf0335ddf
Author: John Carr <john carr unrouted co uk>
Date:   Wed Jun 17 10:07:08 2009 +0100

    Fix ical to ncal conversion

 conduit/modules/TrackerModule/TrackerModule.py |   26 ++++++++++++------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/conduit/modules/TrackerModule/TrackerModule.py b/conduit/modules/TrackerModule/TrackerModule.py
index e8860a6..f805987 100644
--- a/conduit/modules/TrackerModule/TrackerModule.py
+++ b/conduit/modules/TrackerModule/TrackerModule.py
@@ -263,31 +263,31 @@ class TrackerCalendar(DataProvider.TwoWay):
 
         for k, v in ical.contents.iteritems():
             if k == "description":
-                c.description = v
+                c.description = v[0].value
             elif k == "summary":
-                c.summary = v
+                c.summary = v[0].value
             elif k == "dtstart":
-                c.dtstart = ncal.NcalDateTime.create(datetime=v)
+                c.dtstart = ncal.NcalDateTime.create(datetime=v[0].value)
             elif k == "dtend":
-                c.dtend = ncal.NcalDateTime.create(datetime=v)
+                c.dtend = ncal.NcalDateTime.create(datetime=v[0].value)
             elif k == "duration":
-                c.duration = v
+                c.duration = v[0].value
             elif k == "uid":
-                c.uid = v
+                c.uid = v[0].value
             elif k == "url":
-                c.url = v
+                c.url = v[0].value
             elif k == 'recurrence-id':
-                c.recurrenceid = v
+                c.recurrenceid = v[0].value
             elif k == "location":
-                c.location = v
+                c.location = v[0].value
             elif k == "priority":
-                c.priority = v
+                c.priority = v[0].value
             elif k == "last-modified":
-                c.lastmodified = v
+                c.lastmodified = v[0].value
             elif k == "categories":
-                c.categories = v
+                c.categories = v[0].value
             elif k == "contact":
-                c.contact = v
+                c.contact = v[0].value
             elif k == "status":
                 # 'TENTATIVE' etc to an EventStatus instance
                 pass



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]