diff options
author | herbertxue <herbertxue@google.com> | 2020-02-15 17:49:47 +0800 |
---|---|---|
committer | herbertxue <herbertxue@google.com> | 2020-02-15 17:49:47 +0800 |
commit | 9a4962774d60c7711b779e7c81828f146e449066 (patch) | |
tree | a05eacb7fd58cd91ab3931d5911462106c81671f | |
parent | 73a6ebefc87dc9e0ea3cd5e74179bccd54fe3a2b (diff) | |
download | acloud-9a4962774d60c7711b779e7c81828f146e449066.tar.gz |
Fix 'repo info' error in python2 during acloud creation.
Bug: 149460014
Test: acloud-dev create
Change-Id: Ib3c2e21d6a667713c10173fadc093cee90d566ef
-rw-r--r-- | create/avd_spec.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/create/avd_spec.py b/create/avd_spec.py index fed31a5a..85da3d94 100644 --- a/create/avd_spec.py +++ b/create/avd_spec.py @@ -577,7 +577,11 @@ class AVDSpec(object): """ repo_output = "" try: - repo_output = subprocess.check_output(_COMMAND_REPO_INFO) + # TODO(149460014): Migrate acloud to py3, then remove this + # workaround. + env = os.environ.copy() + env.pop("PYTHONPATH", None) + repo_output = subprocess.check_output(_COMMAND_REPO_INFO, env=env) except subprocess.CalledProcessError: utils.PrintColorString( "Unable to determine your repo branch, defaulting to %s" |