aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/security-check.py
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-11-17 13:57:23 +0800
committerfanquake <fanquake@gmail.com>2020-11-17 13:57:40 +0800
commit3457054c61d5b74800797e2c26a8126a21352382 (patch)
tree176e9a3ee43f96713bd0a86ecaf44df201023dbe /contrib/devtools/security-check.py
parent7c0d412a74ba8d791e6b83b6aca82406f2158fc3 (diff)
parentb6121edf70a8d50fd16ddbba0c3168e5e49bfc2e (diff)
Merge #20346: script: modify security-check.py to use "==" instead of "is" for literal comparison
b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e swapped "is" for "==" in literal comparison (Tyler Chambers) Pull request description: In Python 3.8+ literal comparisons using "is" instead of "==" produce a SyntaxWarning [source](https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior). I checked the entire devtools directory, this seems to be the only occurrence. This is a small fix, but removes the SyntaxWarning. Fixes: #20338 ACKs for top commit: hebasto: re-ACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e, only squashed since my [previous](https://github.com/bitcoin/bitcoin/pull/20346#pullrequestreview-525934568) review. practicalswift: re-ACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e: patch still looks correct theStack: utACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e Tree-SHA512: 82a43495d6552fbaa3b02b58f0930b049d27aa937fe44b47714e3c059f844cc494de20674557371cbccf24fb8873ecb7376fb965ae326847eed2b855ed2d59c6
Diffstat (limited to 'contrib/devtools/security-check.py')
-rwxr-xr-xcontrib/devtools/security-check.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index dc74de9198..02615edb54 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -62,7 +62,7 @@ def get_ELF_program_headers(executable):
splitline = [x.strip() for x in line.split()]
flags = splitline[ofs_flags]
# check for 'R', ' E'
- if splitline[ofs_flags + 1] is 'E':
+ if splitline[ofs_flags + 1] == 'E':
flags += ' E'
headers.append((typ, flags, []))
count += 1