From 5bfcbdb9140051684614f59575ed146ea61ea3fd Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 22 Aug 2013 11:16:23 +0100 Subject: [PATCH] `communicate()` first returns `stdout` not `stderr`. --- salt/utils/nb_popen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/utils/nb_popen.py b/salt/utils/nb_popen.py index d7d831ee5d..8e899f393f 100644 --- a/salt/utils/nb_popen.py +++ b/salt/utils/nb_popen.py @@ -211,6 +211,6 @@ class NonBlockingPopen(subprocess.Popen): self.stderr_buff.flush() self.stderr_buff.seek(0) if self.universal_newlines: - return (self._translate_newlines(self.stderr_buff.read()), - self._translate_newlines(self.stdout_buff.read())) - return self.stderr_buff.read(), self.stdout_buff.read() + return (self._translate_newlines(self.stdout_buff.read()), + self._translate_newlines(self.stderr_buff.read())) + return self.stdout_buff.read(), self.stderr_buff.read()