summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-08-07 21:43:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-08-07 21:43:12 +0000
commit1047d9a412c2fd5eb5da7bcc5099daf60a2ea366 (patch)
treeeadaec80c8fa1911c4ab5c481c485873c7df64ca /llvm
parente40f2baa5d969eacb1b05d5d3efca47df438d519 (diff)
downloadbcm5719-llvm-1047d9a412c2fd5eb5da7bcc5099daf60a2ea366.tar.gz
bcm5719-llvm-1047d9a412c2fd5eb5da7bcc5099daf60a2ea366.zip
[lit] Avoid deprecated dict.has_key() method.
llvm-svn: 187917
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/Util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/lit/lit/Util.py b/llvm/utils/lit/lit/Util.py
index 6f09eedfb7a..3b28db48b53 100644
--- a/llvm/utils/lit/lit/Util.py
+++ b/llvm/utils/lit/lit/Util.py
@@ -6,7 +6,7 @@ def detectCPUs():
"""
# Linux, Unix and MacOS:
if hasattr(os, "sysconf"):
- if os.sysconf_names.has_key("SC_NPROCESSORS_ONLN"):
+ if "SC_NPROCESSORS_ONLN" in os.sysconf_names:
# Linux & Unix:
ncpus = os.sysconf("SC_NPROCESSORS_ONLN")
if isinstance(ncpus, int) and ncpus > 0:
@@ -14,7 +14,7 @@ def detectCPUs():
else: # OSX:
return int(capture(['sysctl', '-n', 'hw.ncpu']))
# Windows:
- if os.environ.has_key("NUMBER_OF_PROCESSORS"):
+ if "NUMBER_OF_PROCESSORS" in os.environ:
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
if ncpus > 0:
return ncpus
OpenPOWER on IntegriCloud