From 4e2b35f372e9204d77371d8736d470ae8bd752d7 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 3 Apr 2014 19:54:15 -0700 Subject: [PATCH] avoid use of deprecated os.popen --- beets/util/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 99c39e74f..0d00775d8 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -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: