Skip to content
Snippets Groups Projects
Commit 5798cb1c authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-516: added input parameter

parent f886e90c
No related branches found
No related tags found
No related merge requests found
......@@ -34,10 +34,10 @@ def _convert_bytes_tuple_to_strings(bytes_tuple):
else x
for x in bytes_tuple)
def communicate_returning_strings(proc):
def communicate_returning_strings(proc, input=None):
"""Helper function for subprocess.communicate() which changed from python2 to python3.
This function waits for the subprocess to finish and returns the stdout and stderr as utf-8 strings, just like python2 did."""
return _convert_bytes_tuple_to_strings(proc.communicate())
return _convert_bytes_tuple_to_strings(proc.communicate(input=input))
def check_output_returning_strings(*popenargs, timeout=None, **kwargs):
"""Helper function for subprocess.check_output(...) which changed from python2 to python3.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment