From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/Hook.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'module/plugins/Hook.py') diff --git a/module/plugins/Hook.py b/module/plugins/Hook.py index 1e4749cd5..4d43b70f7 100644 --- a/module/plugins/Hook.py +++ b/module/plugins/Hook.py @@ -81,10 +81,12 @@ class Hook(Base): self.initPeriodical() self.setup() + def initPeriodical(self): if self.interval >=1: self.cb = self.core.scheduler.addJob(0, self._periodical, threaded=False) + def _periodical(self): try: if self.isActivated(): self.periodical() @@ -99,14 +101,17 @@ class Hook(Base): def __repr__(self): return "" % self.__name__ + def setup(self): """ more init stuff if needed """ pass + def unload(self): """ called when hook was deactivated """ pass + def isActivated(self): """ checks if hook is activated""" return self.config.getPlugin(self.__name__, "activated") @@ -116,36 +121,47 @@ class Hook(Base): def coreReady(self): pass + def coreExiting(self): pass + def downloadPreparing(self, pyfile): pass + def downloadFinished(self, pyfile): pass + def downloadFailed(self, pyfile): pass + def packageFinished(self, pypack): pass + def beforeReconnecting(self, ip): pass + def afterReconnecting(self, ip): pass + def periodical(self): pass + def newCaptchaTask(self, task): """ new captcha task for the plugin, it MUST set the handler and timeout or will be ignored """ pass + def captchaCorrect(self, task): pass + def captchaInvalid(self, task): pass -- cgit v1.2.3