mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 13:07:09 +01:00
Replaced find_executable with shutil.which for python 3.12
compatibility as distutils was deprecated.
This commit is contained in:
parent
1696789cbe
commit
6c3f93df2c
1 changed files with 2 additions and 2 deletions
|
|
@ -18,9 +18,9 @@ import errno
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
from distutils.spawn import find_executable
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ class AcousticBrainzSubmitPlugin(plugins.BeetsPlugin):
|
||||||
|
|
||||||
# Get the executable location on the system, which we need
|
# Get the executable location on the system, which we need
|
||||||
# to calculate the SHA-1 hash.
|
# to calculate the SHA-1 hash.
|
||||||
self.extractor = find_executable(self.extractor)
|
self.extractor = shutil.which(self.extractor)
|
||||||
|
|
||||||
# Calculate extractor hash.
|
# Calculate extractor hash.
|
||||||
self.extractor_sha = hashlib.sha1()
|
self.extractor_sha = hashlib.sha1()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue