summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r--module/plugins/internal/Plugin.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index b2d563748..387f499fe 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -262,7 +262,7 @@ def chunks(iterable, size):
class Plugin(object):
__name__ = "Plugin"
__type__ = "plugin"
- __version__ = "0.55"
+ __version__ = "0.56"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -272,13 +272,14 @@ class Plugin(object):
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
def __init__(self, core):
self._init(core)
self.init()
def __repr__(self):
- return "<%(type)s %(name)s>" % {'type': self.__type.capitalize(),
+ return "<%(type)s %(name)s>" % {'type': self.__type__.capitalize(),
'name': self.classname}
@@ -293,14 +294,6 @@ class Plugin(object):
self.req = None #: Browser instance, see `network.Browser`
self.last_html = None
- #@TODO: Remove in 0.4.10
- for attr in ("name", "type", "version", "status", "pattern",
- "config", "description", "license", "authors"):
- if hasattr(self, "__%s" % attr):
- continue
- value = getattr(self, "__%s__" % attr)
- setattr(self, "__%s" % attr, value)
-
def init(self):
"""
@@ -319,35 +312,35 @@ class Plugin(object):
def log_debug(self, *args, **kwargs):
- self._log("debug", self.__type, self.__name, args)
+ self._log("debug", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_info(self, *args, **kwargs):
- self._log("info", self.__type, self.__name, args)
+ self._log("info", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_warning(self, *args, **kwargs):
- self._log("warning", self.__type, self.__name, args)
+ self._log("warning", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_error(self, *args, **kwargs):
- self._log("error", self.__type, self.__name, args)
+ self._log("error", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace', True):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_critical(self, *args, **kwargs):
- self._log("critical", self.__type, self.__name, args)
+ self._log("critical", self.__type__, self.__name__, args)
if kwargs.get('trace', True):
print "Traceback (most recent call last):"
traceback.print_stack()