summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorShreenidhi Shedi <53473811+sshedi@users.noreply.github.com>2022-01-13 01:22:32 +0530
committerGitHub <noreply@github.com>2022-01-12 13:52:32 -0600
commite3f3485d875f021915654bf2b64678e151a8d6f6 (patch)
tree564f89b77371edb01d20164758a073f56da45ea0 /cloudinit/sources
parent88f38158fd432152b9fe341f270c4f52c657ef80 (diff)
downloadvyos-cloud-init-e3f3485d875f021915654bf2b64678e151a8d6f6.tar.gz
vyos-cloud-init-e3f3485d875f021915654bf2b64678e151a8d6f6.zip
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 <sshedi@vmware.com>
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceVMware.py5
1 files changed, 2 insertions, 3 deletions
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"