From c434cf755ca680ccf8a3d52979a92c68dd59295b Mon Sep 17 00:00:00 2001 From: sleeper Date: Sun, 22 Mar 2015 05:44:58 +1100 Subject: [PATCH] Made the recurrence rule parser tolerant of trailing semicolons. --- CHANGES.rst | 3 +++ src/icalendar/prop.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0f6ee19..77a5bc8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,9 @@ Changelog - Documentation fixes. [t-8ch, thet] +- Made RRULE tolerant of trailing semicolons. + [sleeper] + 3.8.4 (2014-11-01) ------------------ diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index c4f0dd4..e67ec2a 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -666,7 +666,10 @@ class vRecur(CaselessDict): try: recur = cls() for pairs in ical.split(';'): - key, vals = pairs.split('=') + try: + key, vals = pairs.split('=') + except ValueError: + continue recur[key] = cls.parse_type(key, vals) return dict(recur) except: