[node-patches] Change in ovirt-node[master]: process: Import PIPE, STDOUT from subprocess

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue May 21 12:19:47 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: process: Import PIPE, STDOUT from subprocess
......................................................................

process: Import PIPE, STDOUT from subprocess

Change-Id: I613847a68f16fd61acff1d8199a3ba34b43d49b2
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/utils/process.py
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/25/14925/1

diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py
index e20e1da..23aa843 100644
--- a/src/ovirt/node/utils/process.py
+++ b/src/ovirt/node/utils/process.py
@@ -25,6 +25,7 @@
 
 import subprocess
 import logging
+from subprocess import STDOUT, PIPE
 
 LOGGER = logging.getLogger(__name__)
 
@@ -79,9 +80,9 @@
         stdout, stderr of the process (as one blob)
     """
     return unicode(popen(cmd, shell=True,
-                         stdin=subprocess.PIPE,
-                         stdout=subprocess.PIPE,
-                         stderr=subprocess.STDOUT).communicate(stdin)[0])
+                         stdin=PIPE,
+                         stdout=PIPE,
+                         stderr=STDOUT).communicate(stdin)[0])
 
 
 def pipe_async(cmd, stdin=None):
@@ -97,8 +98,8 @@
     """
     # https://github.com/wardi/urwid/blob/master/examples/subproc.py
     LOGGER.debug("Piping async '%s'" % cmd)
-    process = popen(cmd, shell=True, stdout=subprocess.PIPE,
-                    stderr=subprocess.PIPE, stdin=stdin)
+    process = popen(cmd, shell=True, stdout=PIPE,
+                    stderr=PIPE, stdin=stdin)
     # pylint: disable-msg=E1101
     if stdin:
         process.stdin.write(stdin)


--
To view, visit http://gerrit.ovirt.org/14925
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I613847a68f16fd61acff1d8199a3ba34b43d49b2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list