diff options
author | 2015-04-20 23:07:42 +0200 | |
---|---|---|
committer | 2015-04-20 23:07:42 +0200 | |
commit | 2475ddb7654d0d6fb1be18082b5c8c480befdbb3 (patch) | |
tree | b82a8b5fc0a309f69733b0a004284f4ef45833d8 /pyload/plugin/Addon.py | |
parent | Spare code cosmetics (9) (diff) | |
parent | added check of classname == filename (diff) | |
download | pyload-2475ddb7654d0d6fb1be18082b5c8c480befdbb3.tar.xz |
Merge branch 'pr/n10_ardi69' into 0.4.10
Conflicts:
pyload/plugin/hoster/FileserveCom.py
Diffstat (limited to 'pyload/plugin/Addon.py')
-rw-r--r-- | pyload/plugin/Addon.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyload/plugin/Addon.py b/pyload/plugin/Addon.py index e8cc03de2..21a86ab05 100644 --- a/pyload/plugin/Addon.py +++ b/pyload/plugin/Addon.py @@ -16,7 +16,7 @@ class Expose(object): def threaded(fn): - def run(*args,**kwargs): + def run(*args, **kwargs): addonManager.startThread(fn, *args, **kwargs) return run @@ -69,6 +69,8 @@ class Addon(Base): self.event_map = None if self.event_list: + self.logWarning(_("Plugin used deprecated 'event_list', use 'event_map' instead")) + for f in self.event_list: self.manager.addEvent(f, getattr(self, f)) @@ -98,7 +100,7 @@ class Addon(Base): def __repr__(self): - return "<Addon %s>" % self.__class__.__name__ + return "<Addon %s>" % self.getClassName() def setup(self): @@ -109,6 +111,7 @@ class Addon(Base): def deactivate(self): """ called when addon was deactivated """ if has_method(self.__class__, "unload"): + self.logWarning(_("Deprecated method 'unload()', use deactivate() instead")) self.unload() @@ -127,6 +130,7 @@ class Addon(Base): def activate(self): """ called when addon was activated """ if has_method(self.__class__, "coreReady"): + self.logWarning(_("Deprecated method 'coreReady()', use activate() instead")) self.coreReady() |