Author: jhb Date: Tue Sep 30 17:19:07 2014 New Revision: 272315 URL: http://svnweb.freebsd.org/changeset/base/272315
Log: Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. Modified: head/tools/sched/schedgraph.py Modified: head/tools/sched/schedgraph.py ============================================================================== --- head/tools/sched/schedgraph.py Tue Sep 30 17:14:11 2014 (r272314) +++ head/tools/sched/schedgraph.py Tue Sep 30 17:19:07 2014 (r272315) @@ -856,7 +856,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"