summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-29 09:44:42 +0200
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-29 09:44:42 +0200
commitf29b67ff6973447de96eeeb465884fc1a51c49ef (patch)
tree7ac2c555ae2ac6f1cffe59661d229ef7d900cc31
parent082464b7e59451a2c993a9851de117c979cc24af (diff)
downloadpykolab-f29b67ff6973447de96eeeb465884fc1a51c49ef.tar.gz
Fix dict conversion of recurrence rules
-rw-r--r--pykolab/xml/recurrence_rule.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pykolab/xml/recurrence_rule.py b/pykolab/xml/recurrence_rule.py
index eb17fd5..4a0b6c5 100644
--- a/pykolab/xml/recurrence_rule.py
+++ b/pykolab/xml/recurrence_rule.py
@@ -60,6 +60,7 @@ class RecurrenceRule(kolabformat.RecurrenceRule):
'until': 'end',
'bymonth': 'bymonth',
'byday': 'byday',
+ 'bymonthday':'bymonthday',
'byyearday': 'byyearday',
'byweekno': 'byweekno',
'byhour': 'byhour',
@@ -106,9 +107,9 @@ class RecurrenceRule(kolabformat.RecurrenceRule):
if isinstance(val, kolabformat.cDateTime):
val = xmlutils.from_cdatetime(val, True)
elif isinstance(val, kolabformat.vectori):
- val = [int(v) for x in val]
+ val = ",".join([int(v) for x in val])
elif isinstance(val, kolabformat.vectordaypos):
- val = ["%d%s" % (x.occurence, self._translate_value(x.weekday)) for x in val]
+ val = ",".join(["%s%s" % (str(x.occurence()) if x.occurence() != 0 else '', self._translate_value(x.weekday(), self.weekday_map)) for x in val])
if val is not None:
data[p] = val