avoid use of deprecated os.popen

This commit is contained in:
Adrian Sampson 2014-04-03 19:54:15 -07:00
parent c5174b3881
commit 4e2b35f372

View file

@ -572,7 +572,7 @@ def cpu_count():
num = 0
elif sys.platform == 'darwin':
try:
num = int(os.popen('sysctl -n hw.ncpu').read())
num = int(command_output(['sysctl', '-n', 'hw.ncpu']))
except ValueError:
num = 0
else: