# HG changeset patch # User Paul Boddie # Date 1442161422 -7200 # Node ID b0501ea02be4bf71af243fde000469cdc1d42598 # Parent ea254765154b6dcbac28aac3759ec91138e49ca6 Simplified new object testing. diff -r ea254765154b -r b0501ea02be4 imiptools/client.py --- a/imiptools/client.py Sun Sep 13 18:01:51 2015 +0200 +++ b/imiptools/client.py Sun Sep 13 18:23:42 2015 +0200 @@ -351,7 +351,7 @@ obj = self.get_stored_object_version() - if not obj or not self.have_new_object(obj): + if not obj or not self.have_new_object(): return False # Get attendee details in a usable form. @@ -453,17 +453,18 @@ return can_schedule(freebusy, periods, self.uid, self.recurrenceid) - def have_new_object(self, obj=None, strict=True): + def have_new_object(self, strict=True): """ - Return whether the current object is new to the current user (or if the - given 'obj' is new). If 'strict' is specified and is a false value, the - DTSTAMP test will be ignored. This is useful in handling responses from - attendees from clients (like Claws Mail) that erase time information - from DTSTAMP and make it invalid. + Return whether the current object is new to the current user. + + If 'strict' is specified and is a false value, the DTSTAMP test will be + ignored. This is useful in handling responses from attendees from + clients (like Claws Mail) that erase time information from DTSTAMP and + make it invalid. """ - obj = obj or self.get_stored_object_version() + obj = self.get_stored_object_version() # If found, compare SEQUENCE and potentially DTSTAMP.