Skip to content

Commit

Permalink
[#383] Remove in-place modification of configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmakhonin committed Sep 24, 2018
1 parent 46030f1 commit f326d6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions legion_test/legion_test/robot/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f326d6d

Please sign in to comment.