Yaniv Bronhaim has uploaded a new change for review.

Change subject: Use deathSignal param only if exists
......................................................................

Use deathSignal param only if exists

This allows to run py3 code that doesn't use deathSinal. otherwise each
call to CPopen adds deathSignal parameter and which does not exists in
Popen.

Change-Id: I66fe048996394bb215b261571c24e7fdab62e88a
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M lib/vdsm/commands.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/61053/1

diff --git a/lib/vdsm/commands.py b/lib/vdsm/commands.py
index bffec83..3f0fc87 100644
--- a/lib/vdsm/commands.py
+++ b/lib/vdsm/commands.py
@@ -43,7 +43,7 @@
 def execCmd(command, sudo=False, cwd=None, data=None, raw=False,
             printable=None, env=None, sync=True, nice=None, ioclass=None,
             ioclassdata=None, setsid=False, execCmdLogger=logging.root,
-            deathSignal=0, resetCpuAffinity=True):
+            deathSignal=None, resetCpuAffinity=True):
     """
     Executes an external command, optionally via sudo.
 
@@ -67,8 +67,11 @@
 
     execCmdLogger.debug(cmdutils.command_log_line(printable, cwd=cwd))
 
-    p = CPopen(command, close_fds=True, cwd=cwd, env=env,
-               deathSignal=deathSignal)
+    extra = {}
+    if deathSignal is not None:
+        extra['deathSignal'] = deathSignal
+    p = CPopen(command, close_fds=True, cwd=cwd, env=env, **extra)
+
     if not sync:
         p = AsyncProc(p)
         if data is not None:


-- 
To view, visit https://gerrit.ovirt.org/61053
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66fe048996394bb215b261571c24e7fdab62e88a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to