From f326d6d90ba1596453174827f5eac0f2d415671a Mon Sep 17 00:00:00 2001 From: Kirill Makhonin Date: Mon, 24 Sep 2018 16:08:13 +0300 Subject: [PATCH] [#383] Remove in-place modification of configuration --- legion_test/legion_test/robot/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legion_test/legion_test/robot/process.py b/legion_test/legion_test/robot/process.py index dce6ff9dd..ce0905c8a 100644 --- a/legion_test/legion_test/robot/process.py +++ b/legion_test/legion_test/robot/process.py @@ -33,12 +33,13 @@ def build_configuration_and_files(configuration): :return: tuple(dict[str, str], list[str]) -- tuple of new configuration and list of temporary files """ new_files = [] + new_configuration = configuration.copy() for stream in ('stdout', 'stderr'): if stream not in configuration: _1, new_file = tempfile.mkstemp(prefix='robot.run_process.') - configuration[stream] = new_file + new_configuration[stream] = new_file new_files.append(new_file) - return configuration, new_files + return new_configuration, new_files class Process: