# HG changeset patch # User Paul Boddie # Date 1515781998 -3600 # Node ID 8b0c1cf12f174101fd8a60c63f34aa867a13d3ee # Parent 4c64472f46b28af94cc87d5d3e3efe394358903f Support rule deletion where a null or empty rule is provided. diff -r 4c64472f46b2 -r 8b0c1cf12f17 imiptools/data.py --- a/imiptools/data.py Fri Jan 12 19:20:38 2018 +0100 +++ b/imiptools/data.py Fri Jan 12 19:33:18 2018 +0100 @@ -3,7 +3,7 @@ """ Interpretation of vCalendar content. -Copyright (C) 2014, 2015, 2016, 2017 Paul Boddie +Copyright (C) 2014, 2015, 2016, 2017, 2018 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -635,7 +635,10 @@ return False old_rrule = self.get_item("RRULE") - self["RRULE"] = [rule] + if rule: + self["RRULE"] = [rule] + elif old_rrule: + del self["RRULE"] return old_rrule != rule def set_exceptions(self, exceptions):