From 9aad2115e0be4aa26b19a7cab968b5cb67ddda6a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 13 Jul 2015 16:16:33 -0700 Subject: [PATCH] El Capitan fix --- beets/util/__init__.py | 4 ++-- docs/changelog.rst | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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)