From: Bernhard Tittelbach Date: Fri, 11 Sep 2009 13:29:53 +0000 (+0000) Subject: error messages are not headline messages X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=2f2fa1baaf28c4cf64a3dd393579559e9dd63e45;p=svn42.git error messages are not headline messages --- diff --git a/update-web-status.py b/update-web-status.py index 4776e6a..8aa58e1 100755 --- a/update-web-status.py +++ b/update-web-status.py @@ -118,14 +118,14 @@ def sendXmppMsg(recipients, msg, resource = "torwaechter", addtimestamp = True, logging.error(str(e)) logging.debug("XMPPmessage sent: '%s'" % msg) -def distributeXmppMsg(msg): +def distributeXmppMsg(msg,high_priority=False): global xmpp_firstmsg, xmpp_msg_lastmsg if xmpp_firstmsg: xmpp_msg_lastmsg = msg xmpp_firstmsg = False - if msg != xmpp_msg_lastmsg: + if msg != xmpp_msg_lastmsg: sendXmppMsg(uwscfg.xmpp_recipients_normal, msg) - sendXmppMsg(uwscfg.xmpp_recipients_nooffline, msg, noofflinemsg=True) + sendXmppMsg(uwscfg.xmpp_recipients_nooffline, msg, noofflinemsg=(not high_priority)) else: sendXmppMsg(uwscfg.xmpp_recipients_debug, "D: " + msg) xmpp_msg_lastmsg = msg @@ -210,7 +210,7 @@ while True: if not m is None: errorstr = m.group(1) if "too long!" in errorstr: - distributeXmppMsg(uwscfg.xmpp_recipients_debug, "Door Error: "+errorstr) + distributeXmppMsg(uwscfg.xmpp_recipients_debug, "Door Error: "+errorstr, high_priority=True) else: sendXmppMsg(uwscfg.xmpp_recipients_debug, "D: Error: "+errorstr) except Exception, ex: