1.1 --- a/imiptools/client.py Wed May 20 15:06:33 2015 +0200
1.2 +++ b/imiptools/client.py Wed May 20 15:55:03 2015 +0200
1.3 @@ -109,14 +109,17 @@
1.4
1.5 # Common operations on calendar data.
1.6
1.7 - def update_participation(self, obj, partstat):
1.8 + def update_participation(self, obj, partstat=None):
1.9
1.10 """
1.11 Update the participation in 'obj' of the user with the given 'partstat'.
1.12 """
1.13
1.14 attendee_attr = uri_dict(obj.get_value_map("ATTENDEE")).get(self.user)
1.15 - attendee_attr["PARTSTAT"] = partstat
1.16 + if not attendee_attr:
1.17 + return None
1.18 + if partstat:
1.19 + attendee_attr["PARTSTAT"] = partstat
1.20 if attendee_attr.has_key("RSVP"):
1.21 del attendee_attr["RSVP"]
1.22 if self.messenger and self.messenger.sender != get_address(self.user):