From 52a50395cd73021b67213739fb19d67f21c438ea Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Fri, 7 Dec 2018 09:49:21 +0000 Subject: [utils] Use operator "in" instead of bound function "has_key" has_key has been removed in Python 3. The in comparison operator can be used instead. Differential Revision: https://reviews.llvm.org/D55310 llvm-svn: 348576 --- llvm/utils/UpdateTestChecks/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/utils/UpdateTestChecks/common.py') diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index daea395e31f..ed591ae37a1 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -104,7 +104,7 @@ def build_function_body_dictionary(function_re, scrubber, scrubber_args, raw_too body = m.group('body') scrubbed_body = do_scrub(body, scrubber, scrubber_args, extra = False) scrubbed_extra = do_scrub(body, scrubber, scrubber_args, extra = True) - if m.groupdict().has_key('analysis'): + if 'analysis' in m.groupdict(): analysis = m.group('analysis') if analysis.lower() != 'cost model analysis': print('WARNING: Unsupported analysis mode: %r!' % (analysis,), file=sys.stderr) -- cgit v1.2.3