Update subprocess.check_output function for Py3 compatible issue.
The subprocess.check_output return type is "bytes" in python 3, we have
to convert bytes as string with .decode() in advance.
Bug: 144319716
Test: acloud-dev create
Change-Id: I379f5d65e850c0e4d4cca943076b712c23979759
diff --git a/setup/gcp_setup_runner.py b/setup/gcp_setup_runner.py
index 2d12ccc..71f2883 100644
--- a/setup/gcp_setup_runner.py
+++ b/setup/gcp_setup_runner.py
@@ -166,8 +166,8 @@
Returns:
String, return message after execute gcloud command.
"""
- return subprocess.check_output([self.gcloud_command_path] + cmd,
- env=self._env, **kwargs)
+ return utils.CheckOutput([self.gcloud_command_path] + cmd,
+ env=self._env, **kwargs)
def RunGsutil(self, cmd, **kwargs):
"""Run gsutil command.
@@ -180,8 +180,8 @@
Returns:
String, return message after execute gsutil command.
"""
- return subprocess.check_output([self.gsutil_command_path] + cmd,
- env=self._env, **kwargs)
+ return utils.CheckOutput([self.gsutil_command_path] + cmd,
+ env=self._env, **kwargs)
class GoogleAPIService(object):