- Revision
- 15937
- Author
- grant
- Date
- 2007-11-28 13:30:52 -0800 (Wed, 28 Nov 2007)
Log Message
Fix Bug 11415 (r=stearns): Cannot create new alarms - streaming traceback on every start of Chandler
- Attempt to bullet-proof the tuples we return from Reminder.getReminderTuples()
by checking for missing/dead values.
- Attempt to bullet-proof the tuples we return from Reminder.getReminderTuples()
by checking for missing/dead values.
Modified Paths
Diff
Modified: trunk/chandler/parcels/osaf/pim/reminders.py (15936 => 15937)
--- trunk/chandler/parcels/osaf/pim/reminders.py 2007-11-28 20:31:36 UTC (rev 15936) +++ trunk/chandler/parcels/osaf/pim/reminders.py 2007-11-28 21:30:52 UTC (rev 15937) @@ -301,11 +301,19 @@ resultTuples = [] for entry in pendingKind.iterItems(): + thisTuple = tuple(getattr(entry, attr, None) + for attr in ('when', 'item', 'reminder')) # Show everything except reminders in the trash, and - # reminders that have been snoozed into the future. - if (not entry.item in trash and - not (entry.snoozed and entry.when > when)): - resultTuples.append((entry.when, entry.item, entry.reminder)) + # reminders that have been snoozed into the future. Also, + # don't return any "dead" items in the tuple, and check + # for missing attributes (bug 11415). + if (thisTuple[0] is not None and + not isDead(thisTuple[1]) and + not isDead(thisTuple[2]) and + not thisTuple[1] in trash and + not (entry.snoozed and thisTuple[0] > when)): + + resultTuples.append(thisTuple) resultTuples.sort(key=lambda t: t[0]) return resultTuples
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
