Replaced find_executable with shutil.which for python 3.12

compatibility as distutils was deprecated.
This commit is contained in:
Sebastian Mohr 2025-08-07 12:50:37 +02:00
parent 1696789cbe
commit 6c3f93df2c

View file

@ -18,9 +18,9 @@ import errno
import hashlib
import json
import os
import shutil
import subprocess
import tempfile
from distutils.spawn import find_executable
import requests
@ -84,7 +84,7 @@ class AcousticBrainzSubmitPlugin(plugins.BeetsPlugin):
# Get the executable location on the system, which we need
# to calculate the SHA-1 hash.
self.extractor = find_executable(self.extractor)
self.extractor = shutil.which(self.extractor)
# Calculate extractor hash.
self.extractor_sha = hashlib.sha1()