mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
avoid use of deprecated os.popen
This commit is contained in:
parent
c5174b3881
commit
4e2b35f372
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue