X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=play-sound-status.py;h=afee171508e1e91296be99f44091df655847e111;hb=ef9ad30686c8ef640cb373272767c8cb7618ca60;hp=03c46772d36cd3e94c64d1afd5df27991053c0da;hpb=0f3c85dd406441eb21d7f8e0218b7eb5cda27beb;p=svn42.git diff --git a/play-sound-status.py b/play-sound-status.py index 03c4677..afee171 100755 --- a/play-sound-status.py +++ b/play-sound-status.py @@ -149,7 +149,7 @@ def runRemoteCommand(remote_host,remote_shell,user,args=[]): sshp = None try: 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)).replace("%USER%", " ".user) + cmd = cmd.replace("%RHOST%",remote_host).replace("%RSHELL%",remote_shell).replace("%ARG%", " ".join(args)).replace("%USER%", user) logging.debug("runRemoteCommand: Executing: "+cmd) 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)) @@ -176,7 +176,7 @@ def runRemoteCommand(remote_host,remote_shell,user,args=[]): def runShellCommand(cmd,ptimeout,stdinput,user,args=[]): global uwscfg - cmd = cmd.replace("%ARG%"," ".join(args)).replace("%USER%", " ".user) + cmd = cmd.replace("%ARG%"," ".join(args)).replace("%USER%", user) if ptimeout is None or float(ptimeout) > 45: ptimeout = 45 popenTimeout2(cmd,stdinput,ptimeout=float(ptimeout))