Skip to content
Snippets Groups Projects
Commit 14674124 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

set universal_newlines flag in Popen

This enables string encoding in passed streams => stdout and stderr
parent ff2ca641
Branches
Tags
No related merge requests found
......@@ -192,7 +192,7 @@ def _RunACCALL(command, temp_dir, query):
"""
proc = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stdin=subprocess.PIPE,
cwd=temp_dir)
cwd=temp_dir, universal_newlines=True)
stdout_value, stderr_value = proc.communicate(query)
# check for successful completion of naccess
......@@ -215,7 +215,7 @@ def _RunNACCESS(command, temp_dir):
:exception: CalledProcessError for non-zero return value
"""
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
cwd=temp_dir)
cwd=temp_dir, universal_newlines=True)
stdout_value, stderr_value = proc.communicate()
# check for successful completion of naccess
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment