We shouldn't use distutils.spawn.find-executable
here, since its use is discouraged:
https://docs.python.org/3/library/distutils.html
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
from base64 import b64encode
from tempfile import NamedTemporaryFile
from subprocess import Popen, PIPE
-from distutils.spawn import find_executable
+
+def find_executable(executable, path):
+ paths = path.split(os.pathsep)
+ for p in paths:
+ f = os.path.join(p, executable)
+ if os.path.isfile(f):
+ return f
+ return None
intro = '''
### autogenerated by samba