From: realraum Date: Wed, 16 Sep 2009 13:32:32 +0000 (+0000) Subject: bt: debugging X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=d939409a75b290c0ca8bd0da6b0d29658da803b0;p=svn42.git bt: debugging --- diff --git a/update-web-status.py b/update-web-status.py index d655bc2..e5ff141 100755 --- a/update-web-status.py +++ b/update-web-status.py @@ -20,7 +20,7 @@ logging.basicConfig( #level=logging.DEBUG, filename='/var/log/tmp/update-web-status.log', format="%(asctime)s %(message)s", - datefmt="%Y-%m-%d %H:%M" + datefmt="%Y-%m-%d %H:%M:%S" ) class UWSConfig: @@ -118,7 +118,7 @@ def sendXmppMsg(recipients, msg, resource = "torwaechter", addtimestamp = True, while timeout_counter > 0: time.sleep(pcheckint) timeout_counter -= pcheckint - if sppoo.poll(): + if not sppoo.poll() is None: logging.debug("XMPPmessage sent: '%s'" % msg) return #timeout reached @@ -126,14 +126,14 @@ def sendXmppMsg(recipients, msg, resource = "torwaechter", addtimestamp = True, if sys.hexversion >= 0x020600F0: sppoo.terminate() else: - subprocess.call(["kill",sppoo.pid]) + subprocess.call(["kill",str(sppoo.pid)]) time.sleep(1.0) if sppoo.poll() is None: logging.error("sendxmpp subprocess still alive, sending SIGKILL to pid %d" % (sppoo.pid)) if sys.hexversion >= 0x020600F0: sppoo.kill() else: - subprocess.call(["kill","-9",sppoo.pid]) + subprocess.call(["kill","-9",str(sppoo.pid)]) except Exception, e: logging.error("sendXmppMsg: "+str(e))