From e3f3485d875f021915654bf2b64678e151a8d6f6 Mon Sep 17 00:00:00 2001 From: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com> Date: Thu, 13 Jan 2022 01:22:32 +0530 Subject: Remove distutils usage (#1177) distutils is getting deprecated soon. Let's replace it with suggested alternatives as suggested in: https://www.python.org/dev/peps/pep-0632/ Remove `requests` version check and related code from url_helper.py as the versions specified are old enough to no longer be relevant. Signed-off-by: Shreenidhi Shedi --- cloudinit/sources/DataSourceVMware.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cloudinit/sources/DataSourceVMware.py') diff --git a/cloudinit/sources/DataSourceVMware.py b/cloudinit/sources/DataSourceVMware.py index ed7f487a..6ef7c9d5 100644 --- a/cloudinit/sources/DataSourceVMware.py +++ b/cloudinit/sources/DataSourceVMware.py @@ -68,14 +68,13 @@ import json import os import socket import time -from distutils.spawn import find_executable import netifaces from cloudinit import dmi from cloudinit import log as logging from cloudinit import sources, util -from cloudinit.subp import ProcessExecutionError, subp +from cloudinit.subp import ProcessExecutionError, subp, which PRODUCT_UUID_FILE_PATH = "/sys/class/dmi/id/product_uuid" @@ -85,7 +84,7 @@ NOVAL = "No value found" DATA_ACCESS_METHOD_ENVVAR = "envvar" DATA_ACCESS_METHOD_GUESTINFO = "guestinfo" -VMWARE_RPCTOOL = find_executable("vmware-rpctool") +VMWARE_RPCTOOL = which("vmware-rpctool") REDACT = "redact" CLEANUP_GUESTINFO = "cleanup-guestinfo" VMX_GUESTINFO = "VMX_GUESTINFO" -- cgit v1.2.3