diff options
author | 2018-02-24 16:48:56 +0800 | |
---|---|---|
committer | 2018-03-13 15:08:00 +0000 | |
commit | 5056e9d46bffebc98bef05eb12e05f25f5f7811e (patch) | |
tree | 4a38dfabaacbeecd74760f6a0bcd188ea5eead65 | |
parent | 5df28e11b200349de3af2acf735ff0fad20283c2 (diff) |
bug-fix: python mimic source method
JIRA: BOTTLENECK-222
Details could be referred to the above JIRA ticket
Change-Id: I07d89ee85e18a78d060959cfac5ded82aa83ef32
Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
(cherry picked from commit 7407bfdb64115ee380b205b88b689762b3340621)
-rw-r--r-- | utils/env_prepare/stack_prepare.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/env_prepare/stack_prepare.py b/utils/env_prepare/stack_prepare.py index c7dae390..640afa13 100644 --- a/utils/env_prepare/stack_prepare.py +++ b/utils/env_prepare/stack_prepare.py @@ -83,7 +83,9 @@ def _source_file(rc_file): p = subprocess.Popen(". %s; env" % rc_file, stdout=subprocess.PIPE, shell=True) output = p.communicate()[0] - env = dict((line.split('=', 1) for line in output.splitlines())) + output_lines = output.splitlines() + del output_lines[5] + env = dict((line.split('=', 1) for line in output_lines)) os.environ.update(env) return env |