From 5cd4248672e5cd62cfec4753bd6d6ce666694f1f Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 25 Jan 2019 12:12:38 +0000 Subject: 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 Reviewed-on: https://gem5-review.googlesource.com/c/15987 Reviewed-by: Giacomo Travaglini --- src/unittest/genini.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unittest') diff --git a/src/unittest/genini.py b/src/unittest/genini.py index f10ad6874..ea2763a34 100755 --- a/src/unittest/genini.py +++ b/src/unittest/genini.py @@ -70,7 +70,7 @@ for path in pathlist: for arg in args: m5execfile(arg, globals()) -if globals().has_key('root') and isinstance(root, Root): +if 'root' in globals() and isinstance(root, Root): instantiate(root) else: print("Instantiation skipped: no root object found.") -- cgit v1.2.3