diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 30a1fcba9..f17571f0d 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -660,8 +660,8 @@ def cpu_count(): num = 0 elif sys.platform == b'darwin': try: - num = int(command_output([b'sysctl', b'-n', b'hw.ncpu'])) - except ValueError: + num = int(command_output([b'/usr/sbin/sysctl', b'-n', b'hw.ncpu'])) + except (ValueError, OSError, subprocess.CalledProcessError): num = 0 else: try: diff --git a/docs/changelog.rst b/docs/changelog.rst index a0e7d70c3..196795698 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -71,6 +71,8 @@ Fixes: * Fix an edge case when producing sanitized filenames where the maximum path length conflicted with the :ref:`replace` rules. Thanks to Ben Ockmore. :bug:`496` :bug:`1361` +* Fix an incompatibility with OS X 10.11 (where ``/usr/sbin`` seems not to be + on the user's path by default). 1.3.13 (April 24, 2015)