summaryrefslogtreecommitdiff
path: root/tools/sched
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2014-09-30 17:19:07 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2014-09-30 17:19:07 +0000
commitc3db6aa680cf2ef0dc85729e9a75f425db61932c (patch)
treede50215e7f52a76b36e69320ac311d9c6833e8bc /tools/sched
parenta6aedc5d49025f8bb5d2b675d3748aa402ffb879 (diff)
downloadsrc-test-c3db6aa680cf2ef0dc85729e9a75f425db61932c.tar.gz
src-test-c3db6aa680cf2ef0dc85729e9a75f425db61932c.zip
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.
Notes
Notes: svn path=/head/; revision=272315
Diffstat (limited to 'tools/sched')
-rw-r--r--tools/sched/schedgraph.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py
index 4335574972e52..e5925141e69ca 100644
--- a/tools/sched/schedgraph.py
+++ b/tools/sched/schedgraph.py
@@ -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)