Fix regression introduced in merge-forward

When #46503 was merged forward, there was a problem in the merge
conflict.  The tuple indexing was kept, and we are now grabbing both
stdout and stderr from the `subprocess.Popen.communicate()`. Therefore a
ValueError is raised when we try to unpack a single element of a tuple
into two separate variables.
This commit is contained in:
Erik Johnson 2018-03-30 12:53:01 -05:00
parent 4609a7dd85
commit dcb0c67309
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -443,7 +443,7 @@ def _run(cmd,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
).communicate(salt.utils.stringutils.to_bytes(py_code))[0]
).communicate(salt.utils.stringutils.to_bytes(py_code))
marker_count = env_bytes.count(marker_b)
if marker_count == 0:
# Possibly PAM prevented the login