summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-09 14:50:17 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-09 14:50:17 (GMT)
commitdd30a91f805242424e584b11c8d310cacdeae93e (patch)
treea70ed5db2637c51e3423f14041edf712be0ff24b
parent7c6686e2aec4c704fcfa5c9f58f8eedf44c3f1cd (diff)
downloadpykolab-dd30a91f805242424e584b11c8d310cacdeae93e.tar.gz
Switch type check: datetime.datetime is also an instance of datetime.date
-rw-r--r--pykolab/xml/event.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index 1ccb097..4e36595 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -643,7 +643,7 @@ class Event(object):
def get_ical_recurrenceid(self):
rid = self.get_recurrence_id()
if isinstance(rid, datetime.datetime) or isinstance(rid, datetime.date):
- prop = icalendar.vDate(rid) if isinstance(rid, datetime.date) else icalendar.vDatetime(rid)
+ prop = icalendar.vDatetime(rid) if isinstance(rid, datetime.datetime) else icalendar.vDate(rid)
if self.thisandfuture:
prop.params.update({'RANGE':'THISANDFUTURE'})
return prop