Always strip() the output of check_output

This commit is contained in:
Alexandre Aubin 2020-10-31 18:53:40 +01:00
parent 542a3ffc61
commit f01466d6ef

View file

@ -28,7 +28,7 @@ def check_output(args, stderr=subprocess.STDOUT, shell=True, **kwargs):
and use shell by default before calling subprocess.check_output.
"""
return subprocess.check_output(args, stderr=stderr, shell=shell, **kwargs)
return subprocess.check_output(args, stderr=stderr, shell=shell, **kwargs).strip()
# Call with stream access ----------------------------------------------