python: Replace dict.has_key with 'key in dict'

Python 3 has removed dict.has_key in favour of 'key in dict'.

Change-Id: I9852a5f57d672bea815308eb647a0ce45624fad5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15987
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
Andreas Sandberg
2019-01-25 12:12:38 +00:00
parent 5cf312eb5b
commit 5cd4248672
9 changed files with 26 additions and 26 deletions

View File

@@ -1338,7 +1338,7 @@ def identifyTarget(t):
ext = t.split('.')[-1]
if ext in target_types:
return ext
if obj2target.has_key(ext):
if ext in obj2target:
return obj2target[ext]
match = re.search(r'/tests/([^/]+)/', t)
if match and match.group(1) in target_types: