# HG changeset patch # User Paul Boddie # Date 1427821607 -7200 # Node ID 2358282130abc92a2f6f0675f3c9d5cb03c130ce # Parent 5972fe7b25a45d08171bfb7e0649bfb9c4131e1f Fixed UID and RECURRENCE-ID testing for conflicting periods. Removed a superfluous (and possibly obstructive) __hash__ method. diff -r 5972fe7b25a4 -r 2358282130ab imiptools/period.py --- a/imiptools/period.py Tue Mar 31 18:25:49 2015 +0200 +++ b/imiptools/period.py Tue Mar 31 19:06:47 2015 +0200 @@ -64,9 +64,6 @@ def as_tuple(self): return self.start, self.end, self.uid, self.transp, self.recurrenceid, self.summary, self.organiser - def __hash__(self): - return hash((self.start, self.end, self.uid)) - def __cmp__(self, other): if isinstance(other, FreeBusyPeriod): return cmp((self.start, self.end, self.uid), (other.start, other.end, other.uid)) @@ -91,7 +88,7 @@ """ for conflict in have_conflict(freebusy, periods, True): - if conflict.uid != uid and conflict.recurrenceid != recurrenceid: + if conflict.uid != uid or conflict.recurrenceid != recurrenceid: return False return True