diff options
author | Walter Purcaro <vuolter@gmail.com> | 2013-07-11 16:53:43 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2013-07-11 16:53:43 +0200 |
commit | 64563ae494fc63dda57949487a3011b8eeb0456f (patch) | |
tree | 191d35afba25440f292a44dc974e22964741761c /module | |
parent | Version 1.08: fixes and cosmetics (diff) | |
download | pyload-64563ae494fc63dda57949487a3011b8eeb0456f.tar.xz |
Version 1.09: code cosmetics
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/DeleteFinished.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py index c03298b2c..155158701 100644 --- a/module/plugins/hooks/DeleteFinished.py +++ b/module/plugins/hooks/DeleteFinished.py @@ -23,7 +23,7 @@ from module.plugins.Hook import Hook class DeleteFinished(Hook): __name__ = 'DeleteFinished' - __version__ = '1.08' + __version__ = '1.09' __description__ = 'Automatically delete all finished packages from queue' __config__ = [ ('activated', 'bool', 'Activated', 'False'), @@ -71,13 +71,14 @@ class DeleteFinished(Hook): ## event managing ## def addEvent(self, event, func): '''Adds an event listener for event name''' - if event in self.manager.events: - if func in self.manager.events[event]: + if event in self.m.events: + if func in self.m.events[event]: self.logDebug('Function already registered %s' % func) else: - self.manager.events[event].append(func) + self.m.events[event].append(func) else: - self.manager.events[event] = [func] + self.m.events[event] = [func] def setup(self): - self.removeEvent = self.manager.removeEvent + self.m = self.manager + self.removeEvent = self.m.removeEvent |