summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-30 14:24:49 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-30 14:24:49 -0400
commit5aa6b400ee6ed8f5293aa33427fb769b43736907 (patch)
treeeb1e53286d35783c6adefaad157d9dff76a37c19
parentf1b19fd7d9eab2b110a317e50141dd74d3497090 (diff)
downloadpykolab-5aa6b400ee6ed8f5293aa33427fb769b43736907.tar.gz
Read/write comment property for event objects (#3186)
-rw-r--r--pykolab/xml/event.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index 98436d9..75b00ac 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -322,6 +322,12 @@ class Event(object):
def get_description(self):
return self.event.description()
+ def get_comment(self):
+ if hasattr(self.event, 'comment'):
+ return self.event.comment()
+ else:
+ return None
+
def get_duration(self):
duration = self.event.duration()
if duration and duration.isValid():
@@ -601,6 +607,10 @@ class Event(object):
def set_description(self, description):
self.event.setDescription(str(description))
+ def set_comment(self, comment):
+ if hasattr(self.event, 'setComment'):
+ self.event.setComment(str(comment))
+
def set_dtstamp(self, _datetime):
self.event.setLastModified(xmlutils.to_cdatetime(_datetime, False))