Code Review
/
bottlenecks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
bug-fix: python mimic source method
[bottlenecks.git]
/
utils
/
env_prepare
/
stack_prepare.py
diff --git
a/utils/env_prepare/stack_prepare.py
b/utils/env_prepare/stack_prepare.py
index
5de6218
..
640afa1
100644
(file)
--- a/
utils/env_prepare/stack_prepare.py
+++ b/
utils/env_prepare/stack_prepare.py
@@
-44,7
+44,7
@@
def _prepare_env_daemon(test_yardstick):
file_after)
docker_env.docker_exec_cmd(yardstick_contain,
cmd)
file_after)
docker_env.docker_exec_cmd(yardstick_contain,
cmd)
- cmd = "sed -i '1
3
s/http/file/g' /etc/yardstick/yardstick.conf"
+ cmd = "sed -i '1
2
s/http/file/g' /etc/yardstick/yardstick.conf"
docker_env.docker_exec_cmd(yardstick_contain,
cmd)
docker_env.docker_exec_cmd(yardstick_contain,
cmd)
@@
-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]
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
os.environ.update(env)
return env