Skip to content

Commit

Permalink
Replace distutils.spawn.find_executable with shutil.which
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jun 10, 2024
1 parent fe626bf commit 2bc9587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/sdss_access/sync/curl.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import absolute_import, division, print_function, unicode_literals
# The line above will help with 2to3 support.

import distutils.spawn
import re
import shutil
import time
from os import popen
from os.path import exists, dirname, join, basename, getsize, getmtime, sep
Expand All @@ -28,7 +28,7 @@ class CurlAccess(BaseAccess):
def __init__(self, label='sdss_curl', stream_count=5, mirror=False, public=False, release=None,
verbose=False):

if not distutils.spawn.find_executable('curl'):
if not shutil.which('curl'):
msg = ('cURL does not appear to be installed. To install, the cURL '
'download wizard is located at: https://curl.haxx.se/dlwiz/. '
'Installation tutorials for cURL (software from https://curl.haxx.se) '
Expand Down

0 comments on commit 2bc9587

Please sign in to comment.