summaryrefslogtreecommitdiff
path: root/utils
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
commitf86151617920a4e3a348e24b999f9ab593fa2e3a (patch)
tree932d61579c92b9a3c1de0112c8dfc26fe7467607 /utils
parent10251753b6897adcd22cc981c0cc42f348c109de (diff)
downloadllvm-f86151617920a4e3a348e24b999f9ab593fa2e3a.tar.gz
llvm-f86151617920a4e3a348e24b999f9ab593fa2e3a.tar.bz2
llvm-f86151617920a4e3a348e24b999f9ab593fa2e3a.tar.xz
[lit] Avoid deprecated dict.has_key() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/Util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/lit/lit/Util.py b/utils/lit/lit/Util.py
index 6f09eedfb7..3b28db48b5 100644
--- a/utils/lit/lit/Util.py
+++ b/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