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/setup_common.py b/setup/setup_common.py
index f5ded57..97ea141 100644
--- a/setup/setup_common.py
+++ b/setup/setup_common.py
@@ -21,6 +21,7 @@
import subprocess
from acloud import errors
+from acloud.internal.lib import utils
logger = logging.getLogger(__name__)
@@ -50,7 +51,7 @@
print("Run command: %s" % cmd)
logger.debug("Run command: %s", cmd)
- return subprocess.check_output(cmd, **kwargs)
+ return utils.CheckOutput(cmd, **kwargs)
def InstallPackage(pkg):