cmd = cmd.replace("%ARG%"," ".join(args))
if ptimeout is None or float(ptimeout) > 45:
ptimeout = 45
- popenTimeout2(cmd,stdinput,float(ptimeout))
+ popenTimeout2(cmd,stdinput,ptimeout=float(ptimeout))
def executeAction(action_name, args=[]):
if action_name is None:
time.sleep(pcheckint)
timeout_counter -= pcheckint
if not sppoo.poll() is None:
- logging.debug("popenTimeout2: subprocess %d finished, returncode: %d" % (sppoo.pid,sppoo.returncode))
+ logging.debug("popenTimeout1: subprocess %d finished, returncode: %d" % (sppoo.pid,sppoo.returncode))
return (sppoo.returncode in returncode_ok)
#timeout reached
logging.error("popenTimeout1: subprocess took too long (>%fs), sending SIGTERM to pid %d" % (ptimeout,sppoo.pid))
m = RE_BUTTON.match(line)
if not m is None:
- playThemeOf(user="PANIC")
- continue
+ playThemeOf(user="PANIC", fallback_default="nothing")
+ continue
m = RE_ERROR.match(line)
if not m is None:
- playThemeOf(user="ERROR")
- continue
+ playThemeOf(user="ERROR", fallback_default="nothing")
+ continue
except Exception, ex:
logging.error("main: "+str(ex))