From: Jonathan Rajotte Date: Thu, 26 Oct 2017 15:09:53 +0000 (-0400) Subject: Output env cmd file as a possible bash like format for easier debugging X-Git-Url: http://git.efficios.com/?p=deliverable%2Flttng-ivc.git;a=commitdiff_plain;h=0a7e963afd224897461ffcc1fe089c48cb97aa3f Output env cmd file as a possible bash like format for easier debugging Signed-off-by: Jonathan Rajotte --- diff --git a/lttng_ivc/utils/runtime.py b/lttng_ivc/utils/runtime.py index a89c23b..0103dbf 100644 --- a/lttng_ivc/utils/runtime.py +++ b/lttng_ivc/utils/runtime.py @@ -147,7 +147,8 @@ class Runtime(object): env_path = os.path.join(self.__runtime_log, str(tmp_id) + ".env") with open(env_path, 'w') as env_out: - pprint.pprint(env, stream=env_out) + for key, value in env.items(): + env_out.write('{}={}\n'.format(key, value)) cp = subprocess.run(args, stdout=stdout, stderr=stderr, env=env, cwd=cwd) _logger.debug("Command #{} args: {} stdout: {} stderr{}".format(tmp_id, cp.args, out_path, err_path))