actiontype nothing
[svn42.git] / play-sound-status.py
index 65b40cd..77abfd6 100755 (executable)
@@ -145,7 +145,7 @@ def runRemoteCommand(remote_host,remote_shell,args=[]):
     cmd = "ssh -i /flash/tuer/id_rsa -o PasswordAuthentication=no -o StrictHostKeyChecking=no %RHOST% %RSHELL%"
     cmd = cmd.replace("%RHOST%",remote_host).replace("%RSHELL%",remote_shell).replace("%ARG%", " ".join(args))
     logging.debug("runRemoteCommand: Executing: "+cmd)
-    sshp = subprocess.Popen(cmd, bufsize=1024, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False)
+    sshp = subprocess.Popen(cmd.split(" "), bufsize=1024, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False)
     logging.debug("runRemoteCommand: pid %d: running=%d" % (sshp.pid,sshp.poll() is None))
     if not sshp.poll() is None:
       logging.error("runRemoteCommand: subprocess %d not started ?, returncode: %d" % (sshp.pid,sshp.returncode))
@@ -197,6 +197,8 @@ def executeAction(action_name, args=[]):
     return runRemoteCommand(uwscfg.getValue(action_name+"_remote_host"), uwscfg.getValue(action_name+"_remote_shell"), args)
   elif action_type == "shellcmd":
     return runShellCommand(cmd=uwscfg.getValue(action_name+"_cmd"), ptimeout=uwscfg.getValue(action_name+"_timeout"), stdinput=uwscfg.getValue(action_name+"_stdinput"), args=args)
+  elif action_type == "nothing":
+    return True
   else:
     return executeAction(action_type,args)
   
@@ -207,7 +209,7 @@ def playThemeOf(user):
   if config is None:
     config=uwscfg.getValue("mapping_default")
   logging.debug("playThemeOf: action for user %s: %s" % (user,config))
-  executeAction(config)
+  executeAction(config,[])
 
 def popenTimeout1(cmd, pinput, returncode_ok=[0], ptimeout = 20.0, pcheckint = 0.25):
   logging.debug("popenTimeout1: starting: " + cmd)