[node-patches] Change in ovirt-node[node-3.0]: process: Import PIPE, STDOUT from subprocess
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Tue May 21 14:42:22 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: Ifee3c8894cf213d5e077effe5a0933da673183de
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/42/14942/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/14942
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifee3c8894cf213d5e077effe5a0933da673183de
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-3.0
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list