collective/icalendar — Issue #27: multiple periods in 1 freebusy component
Author: rainerwahnsinn
Created: 2012-02-02 13:08:57+00:00
State: open

the following is a freebusy response to a freebusy request

> "BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//davmail.sf.net/NONSGML DavMail Calendar V1.1//EN
METHOD:REPLY
BEGIN:VFREEBUSY
DTSTAMP:20120131T123000Z
ORGANIZER:MAILTO:organizer@domain.tld
DTSTART:20120101T000000Z
DTEND:20120201T000000Z
UID:null
ATTENDEE:MAILTO:attendee@domain.tld
FREEBUSY;FBTYPE=BUSY:20120103T091500Z/20120103T101500Z,20120113T130000Z/20120113T150000Z,20120116T130000Z/20120116T150000Z,20120117T091500Z/20120117T101500Z,20120118T160000Z/20120118T163000Z,20120124T083000Z/20120124T093000Z,20120124T123000Z/20120124T143000Z,20120131T091500Z/20120131T101500Z
END:VFREEBUSY
END:VCALENDAR"

when i parse this via `icalendar.Calendar.from_ical(myresponse_string)` i get the following error:

> "Traceback (most recent call last):
File "./test.py", line 68, in
test2()
File "./test.py", line 56, in test2
ical = icalendar.Calendar.from_ical(rtext)
File "/usr/local/zope2.13/local/lib/python2.7/site-packages/icalendar-3.0-py2.7.egg/icalendar/cal.py", line 380, in from_ical
vals = factory(factory.from_ical(vals))
File "/usr/local/zope2.13/local/lib/python2.7/site-packages/icalendar-3.0-py2.7.egg/icalendar/prop.py", line 774, in from_ical
raise ValueError, 'Expected period format, got: %s' % ical
ValueError: Expected period format, got: 20120103T091500Z/20120103T101500Z,20120113T130000Z/20120113T150000Z,20120116T130000Z/20120116T150000Z,20120117T091500Z/20120117T101500Z,20120118T160000Z/20120118T163000Z,20120124T083000Z/20120124T093000Z,20120124T123000Z/20120124T143000Z,20120131T091500Z/20120131T101500Z"

according to rfc 5545 this is a valid format, see:
http://tools.ietf.org/html/rfc5545#page-62