summaryrefslogtreecommitdiff
path: root/tools/sched
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2015-11-18 23:32:29 +0000
committerCraig Rodrigues <rodrigc@FreeBSD.org>2015-11-18 23:32:29 +0000
commitaef675d879686dd34c3eb7dbadab7a872b3f3eba (patch)
tree5a5e32204f4c07db711039f190bb5c152599f8fd /tools/sched
parent69527b11bb5e1bb234a29eed864896cb1a13d652 (diff)
downloadsrc-test-aef675d879686dd34c3eb7dbadab7a872b3f3eba.tar.gz
src-test-aef675d879686dd34c3eb7dbadab7a872b3f3eba.zip
Use 'in' instead of 'has_key()' for testing dictionary membership.
Notes
Notes: svn path=/head/; revision=291036
Diffstat (limited to 'tools/sched')
-rw-r--r--tools/sched/schedgraph.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py
index f0552cacdcc58..0723dc3324e79 100644
--- a/tools/sched/schedgraph.py
+++ b/tools/sched/schedgraph.py
@@ -461,7 +461,7 @@ class SourceStats(Toplevel):
if (event.type == "pad"):
continue
duration = event.duration
- if (eventtypes.has_key(event.name)):
+ if (event.name in eventtypes):
(c, d) = eventtypes[event.name]
c += 1
d += duration
@@ -1069,7 +1069,7 @@ class KTRFile:
def makeid(self, group, id, type):
tag = group + id
- if (self.taghash.has_key(tag)):
+ if (tag in self.taghash):
return self.taghash[tag]
if (type == "counter"):
source = Counter(group, id)