[llvm-commits] [llvm] r134324 - /llvm/trunk/utils/lit/lit/Util.py
Jordy Rose
jediknil at belkadan.com
Sat Jul 2 10:28:55 PDT 2011
Author: jrose
Date: Sat Jul 2 12:28:55 2011
New Revision: 134324
URL: http://llvm.org/viewvc/llvm-project?rev=134324&view=rev
Log:
Use subprocess.Popen instead of popen2 to stop a deprecation warning when running lit on OS X
Modified:
llvm/trunk/utils/lit/lit/Util.py
Modified: llvm/trunk/utils/lit/lit/Util.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/Util.py?rev=134324&r1=134323&r2=134324&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/Util.py (original)
+++ llvm/trunk/utils/lit/lit/Util.py Sat Jul 2 12:28:55 2011
@@ -12,7 +12,7 @@
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"])
More information about the llvm-commits
mailing list