diff options
author | Roger Ferrer Ibanez <rofirrim@gmail.com> | 2018-12-07 09:49:21 +0000 |
---|---|---|
committer | Roger Ferrer Ibanez <rofirrim@gmail.com> | 2018-12-07 09:49:21 +0000 |
commit | 52a50395cd73021b67213739fb19d67f21c438ea (patch) | |
tree | 6ef4a91097d93d13d5f8f69278adf9535fc0f0a8 /llvm/utils/UpdateTestChecks/common.py | |
parent | 9c7d85bc623d78078ad92479414164bb4e648a97 (diff) | |
download | bcm5719-llvm-52a50395cd73021b67213739fb19d67f21c438ea.tar.gz bcm5719-llvm-52a50395cd73021b67213739fb19d67f21c438ea.zip |
[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
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |