hadong has uploaded a new change for review. Change subject: process: Make __check_for_problems a bit more strict ......................................................................
process: Make __check_for_problems a bit more strict Change-Id: Ic0db1a8c610fa9587460213a1d80f9a3cf81394c Signed-off-by: hadong <[email protected]> --- M src/ovirt/node/utils/process.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/27/19427/1 diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py index b6e0cbd..21ee8e5 100644 --- a/src/ovirt/node/utils/process.py +++ b/src/ovirt/node/utils/process.py @@ -44,7 +44,8 @@ def __check_for_problems(args, kwargs): - if ("shell" in kwargs) and (args and type(args[0]) is list): + if ("shell" in kwargs and kwargs["shell"]) and \ + (args and type(args[0]) is list): raise RuntimeError("Combining shell=True and a command list does " + "not work. With shell=True the first argument" + "must be a string. A list otherwise.") @@ -109,3 +110,5 @@ "stderr": STDOUT}) __check_for_problems(cmd, kwargs) return unicode(popen(cmd, **kwargs).communicate(stdin)[0]) + + -- To view, visit http://gerrit.ovirt.org/19427 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0db1a8c610fa9587460213a1d80f9a3cf81394c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: hadong <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
