Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
5798cb1c
Commit
5798cb1c
authored
5 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-516
: added input parameter
parent
f886e90c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/PyCommon/subprocess_utils.py
+2
-2
2 additions, 2 deletions
LCS/PyCommon/subprocess_utils.py
with
2 additions
and
2 deletions
LCS/PyCommon/subprocess_utils.py
+
2
−
2
View file @
5798cb1c
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment