[node-patches] Change in ovirt-node[master]: utils: Remove process.pipe_async
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Mon Jul 8 12:11:44 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: utils: Remove process.pipe_async
......................................................................
utils: Remove process.pipe_async
pipe_async was broken by design (e.g. it couldn't handle when there was
no output from the process) and it was unused, so removing it.
Change-Id: Ica3f0af0c663e9a1bc52b33bb70091e595b3df5f
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/utils/process.py
1 file changed, 0 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/71/16571/1
diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py
index 3878174..1ddcd5f 100644
--- a/src/ovirt/node/utils/process.py
+++ b/src/ovirt/node/utils/process.py
@@ -98,26 +98,3 @@
stdout=PIPE,
stderr=STDOUT
).communicate(stdin)[0])
-
-
-def pipe_async(cmd, stdin=None):
- """Run a command interactively and yields the process output.
- This functions allows to pass smoe input to a running command.
-
- Args:
- cmd: Commandline to be run
- stdin: Data to be written to cmd's stdin
-
- Yields:
- Lines read from stdout
- """
- # https://github.com/wardi/urwid/blob/master/examples/subproc.py
- LOGGER.debug("Piping async '%s'" % cmd)
- process = popen(cmd, shell=True, stdout=PIPE,
- stderr=PIPE, stdin=stdin)
- # pylint: disable-msg=E1101
- if stdin:
- process.stdin.write(stdin)
- while process.poll() is None:
- yield process.stdout.readline()
- # pylint: enable-msg=E1101
--
To view, visit http://gerrit.ovirt.org/16571
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica3f0af0c663e9a1bc52b33bb70091e595b3df5f
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