DrTrigon has submitted this change and it was merged.

Change subject: bugfix; time discriminant had wrong sign and did not work 
therefore
......................................................................


bugfix; time discriminant had wrong sign and did not work therefore

Change-Id: I554c6901e0824f13a5bfbc4fe69719b9a15f96f0
---
M public_html/cgi-bin/panel.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  DrTrigon: Verified; Looks good to me, approved



diff --git a/public_html/cgi-bin/panel.py b/public_html/cgi-bin/panel.py
index 80ef5ca..aedf515 100755
--- a/public_html/cgi-bin/panel.py
+++ b/public_html/cgi-bin/panel.py
@@ -566,7 +566,7 @@
        data['botstate_daily'] = botstate_img['red']
        color = html_color['red']
        state_text = "n/a"
-       if lastrun and ((lastrun-time()) <= (bottimeout*60*60)):
+       if lastrun and ((time()-lastrun) <= (bottimeout*60*60)):
                if   (botmsg == botdonemsg) and not (stat['ecount']['end'] - 
stat['ecount']['start']):
                        data['botstate_daily'] = botstate_img['green']
                        color = html_color['green']
@@ -615,7 +615,7 @@
                logfile = os.path.join(localdir, item)
                lasttime = os.stat(logfile).st_mtime
                logstate = botstate_img['red']
-               if (lasttime-time()) <= (bottimeout*60*60):
+               if (time()-lasttime) <= (bottimeout*60*60):
                        if   (s['lastmessage'] == botdonemsg) and not 
(s['ecount']['end'] - s['ecount']['start']):
                                logstate = botstate_img['green']
                        elif (botmsg.find(botdonemsg) == 0):

-- 
To view, visit https://gerrit.wikimedia.org/r/114497
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I554c6901e0824f13a5bfbc4fe69719b9a15f96f0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/drtrigonbot
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to