diff options
author | Jordy Rose <jediknil@belkadan.com> | 2011-07-02 17:28:55 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2011-07-02 17:28:55 +0000 |
commit | 2f494b6afc921369c4878ec54646b077e4a3e81e (patch) | |
tree | 846bf7ee9c25df87768fa12a316f0a364a8e354b /utils/lit | |
parent | d6b98e8bd8c0f4eb5f06fa3e57a12784b836b1ba (diff) | |
download | external_llvm-2f494b6afc921369c4878ec54646b077e4a3e81e.zip external_llvm-2f494b6afc921369c4878ec54646b077e4a3e81e.tar.gz external_llvm-2f494b6afc921369c4878ec54646b077e4a3e81e.tar.bz2 |
Use subprocess.Popen instead of popen2 to stop a deprecation warning when running lit on OS X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/Util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/lit/lit/Util.py b/utils/lit/lit/Util.py index 5635f50..226e453 100644 --- a/utils/lit/lit/Util.py +++ b/utils/lit/lit/Util.py @@ -12,7 +12,7 @@ def detectCPUs(): if isinstance(ncpus, int) and ncpus > 0: return ncpus else: # OSX: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) + return int(capture(['sysctl', '-n', 'hw.ncpu'])) # Windows: if os.environ.has_key("NUMBER_OF_PROCESSORS"): ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]) |