9151: [Regression] vCal Export File format invalid

Do not encode text anymore (patch by Serge)

Fix an invalid RRULE for annual recurence

TODO: maybe try to update to VCalendar 2.0 (iCal)?
This commit is contained in:
romjerome 2016-03-16 11:19:15 +01:00
parent 5eeda60b60
commit 6fabb04bbe

View File

@ -90,7 +90,7 @@ class CalendarWriter(object):
self.oldval = newval
def writeln(self, text):
self.g.write('%s\n' % text.encode('ascii', 'backslashreplace'))
self.g.write('%s\n' % text)
def export_data(self, filename):
@ -239,7 +239,7 @@ class CalendarWriter(object):
self.writeln("SUMMARY:"+_("Anniversary: %s") % event_text)
if location:
self.writeln("LOCATION:%s" % location)
self.writeln("RRULE:YD1 #0")
self.writeln("RRULE:FREQ=YEARLY")
self.writeln(date_string)
self.writeln("END:VEVENT")