Output env cmd file as a possible bash like format for easier debugging
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 26 Oct 2017 15:09:53 +0000 (11:09 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 26 Oct 2017 15:09:53 +0000 (11:09 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
lttng_ivc/utils/runtime.py

index a89c23bf6c283a5b882870ad20bd5e159fcf27b5..0103dbf1b9e64848ab5dfbe2115d92a0eff6d320 100644 (file)
@@ -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))
This page took 0.023468 seconds and 5 git commands to generate.