[node-patches] Change in ovirt-node[master]: Check if shell in kwargs is actually true instead of just pr...

rbarry at redhat.com rbarry at redhat.com
Mon Sep 23 17:08:51 UTC 2013


Ryan Barry has uploaded a new change for review.

Change subject: Check if shell in kwargs is actually true instead of just present
......................................................................

Check if shell in kwargs is actually true instead of just present

Previously, process.__check_for_problems only looked for the
existence of "shell" as a kwarg, but the service call explicitly
sets shell to False. See whether or not it's true before we
throw a runtime error.

Change-Id: I12d7e73b18b0e23335b5f481d0e06d302f5b1438
Bug-Url: http://bugizlla.redhat.com/show_bug.cgi?id=1010629
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/utils/process.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/85/19485/1

diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py
index b6e0cbd..3258c19 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"] == True) 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.")


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12d7e73b18b0e23335b5f481d0e06d302f5b1438
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list