Reindent
authorJoerg Jaspert <joerg@debian.org>
Sat, 14 Feb 2009 09:01:24 +0000 (10:01 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 14 Feb 2009 09:01:24 +0000 (10:01 +0100)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
Dak/plugin.py

index d370b5a..691dad4 100644 (file)
@@ -61,40 +61,40 @@ class Dak(callbacks.Plugin):
                     lastdinstall = ldt
 
             if lastdinstall <= self.dinstallduration:
-                        msgMaker = ircmsgs.privmsg
-                        log.debug("DAK: In Dinstall timeframe")
-                        # No longer time to warn only, now is time to act, if we haven't already
-                        if self.registryValue('dinstall') == True:
-                            log.debug("DAK: Already done once, dinstall flag is %s" %(self.registryValue('dinstall')))
-                            return
-                        log.debug("DAK: Not yet done, dinstall flag %s" % (self.registryValue('dinstall')))
-                        conf.supybot.plugins.Dak.get('dinstall').setValue(True)
-                        conf.supybot.plugins.Dak.get('warned').setValue(True)
-                        irc.queueMsg(msgMaker(self.channel, "It is DINSTALL time"))
-                        if len(self.locks) >= 1:
-                            for key in self.locks:
-                                irc.queueMsg(msgMaker(self.channel, "%s: DINSTALL time, stop working, unlocking %s" % (self.locks[key], key)))
-                            self.locks={}
-                        return
+                msgMaker = ircmsgs.privmsg
+                log.debug("DAK: In Dinstall timeframe")
+                # No longer time to warn only, now is time to act, if we haven't already
+                if self.registryValue('dinstall') == True:
+                    log.debug("DAK: Already done once, dinstall flag is %s" %(self.registryValue('dinstall')))
+                    return
+                log.debug("DAK: Not yet done, dinstall flag %s" % (self.registryValue('dinstall')))
+                conf.supybot.plugins.Dak.get('dinstall').setValue(True)
+                conf.supybot.plugins.Dak.get('warned').setValue(True)
+                irc.queueMsg(msgMaker(self.channel, "It is DINSTALL time"))
+                if len(self.locks) >= 1:
+                    for key in self.locks:
+                        irc.queueMsg(msgMaker(self.channel, "%s: DINSTALL time, stop working, unlocking %s" % (self.locks[key], key)))
+                    self.locks={}
+                return
             elif nextdinstall <= self.warntime:
-                        # Not dinstall as far as we know, but we want to warn people if they have locks, dinstall is soon.
-                        # We only want to warn once about locks people have, or we would do it every 30 seconds, which wouldnt be nice.
-                        # Also, with warnframe larger than dinstallframe, this might warn in case the bot somehow misses dinstallframe.
-                        # Like if it comes up late, or so. Or?
-                        msgMaker = ircmsgs.privmsg
-                        log.debug("DAK: In Dinstall Warnframe")
-                        if self.registryValue('warned') == True:
-                            log.debug("DAK: We already warned once, warn flag %s" % (self.registryValue('warned')))
-                            return
-                        log.debug("DAK: Not yet warned about upcoming Dinstall run, flag is %s." % (self.registryValue('warned')))
-
-                        if len(self.locks) >= 1:
-                            conf.supybot.plugins.Dak.get('warned').setValue(True)
-                            for key in self.locks:
-                                log.debug("DAK: Warning %s, has %s locked." % (self.locks[key], key))
-                                irc.queueMsg(msgMaker(self.channel, "%s: DINSTALL soon, hurry up" % (self.locks[key]) ))
-                                if key == "ALL":
-                                    irc.queueMsg(msgMaker(self.channel, "%s: ALL locked. If you want to keep that, remember turning off cron" % (self.locks[key]) ))
+                # Not dinstall as far as we know, but we want to warn people if they have locks, dinstall is soon.
+                # We only want to warn once about locks people have, or we would do it every 30 seconds, which wouldnt be nice.
+                # Also, with warnframe larger than dinstallframe, this might warn in case the bot somehow misses dinstallframe.
+                # Like if it comes up late, or so. Or?
+                msgMaker = ircmsgs.privmsg
+                log.debug("DAK: In Dinstall Warnframe")
+                if self.registryValue('warned') == True:
+                    log.debug("DAK: We already warned once, warn flag %s" % (self.registryValue('warned')))
+                    return
+                log.debug("DAK: Not yet warned about upcoming Dinstall run, flag is %s." % (self.registryValue('warned')))
+
+                if len(self.locks) >= 1:
+                    conf.supybot.plugins.Dak.get('warned').setValue(True)
+                    for key in self.locks:
+                        log.debug("DAK: Warning %s, has %s locked." % (self.locks[key], key))
+                        irc.queueMsg(msgMaker(self.channel, "%s: DINSTALL soon, hurry up" % (self.locks[key]) ))
+                        if key == "ALL":
+                            irc.queueMsg(msgMaker(self.channel, "%s: ALL locked. If you want to keep that, remember turning off cron" % (self.locks[key]) ))
             else: # if hour in self.dinstallhour
                 # We are far outside a dinstall start
                 log.debug("DAK: no dinstall close, lastdinstall: %d, nextdinstall: %d" % (lastdinstall, nextdinstall))