acloud: fix py3 compatible issue: ModuleNotFoundError: No module named 'distutils.spawn'
BUG: 137195528
BUG: 144319579
Test: atest acloud_test --host
acloud-dev create
acloud-dev create --local-instance
acloud-dev delete
acloud-dev setup --force
Change-Id: Iced0aef43643c90dfa062a2ef341cf4ab264015c
diff --git a/setup/google_sdk.py b/setup/google_sdk.py
index 925b772..4867ca9 100644
--- a/setup/google_sdk.py
+++ b/setup/google_sdk.py
@@ -27,7 +27,6 @@
google_sdk.CleanUp()
"""
-from distutils.spawn import find_executable
import logging
import os
import platform
@@ -100,7 +99,7 @@
Return:
Boolean, return True if gcloud is installed, False otherwise.
"""
- if find_executable(GCLOUD_BIN):
+ if utils.FindExecutable(GCLOUD_BIN):
return True
return False
@@ -146,7 +145,7 @@
Raise:
NoGoogleSDKDetected if we can't find the sdk path.
"""
- builtin_gcloud = find_executable(GCLOUD_BIN)
+ builtin_gcloud = utils.FindExecutable(GCLOUD_BIN)
if builtin_gcloud:
return os.path.dirname(builtin_gcloud)
elif os.path.exists(self._tmp_sdk_path):