JIRA: BOTTLENECK-222
Details could be referred to the above JIRA ticket
Change-Id: I07d89ee85e18a78d060959cfac5ded82aa83ef32
Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
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