diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-27 20:11:56 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-27 22:53:01 +0100 |
commit | a32ab94ad39f14febf6d0526e368478d829a17c5 (patch) | |
tree | d3b619f210203db1bf6fc08bf5e7d7307fd05dd6 /module/plugins/internal/Plugin.py | |
parent | Update some hosters (diff) | |
download | pyload-a32ab94ad39f14febf6d0526e368478d829a17c5.tar.xz |
[internal] Spare code optimizations and fixes
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r-- | module/plugins/internal/Plugin.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 779865147..43284f6a8 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -51,11 +51,18 @@ class Plugin(object): def _init(self, core): - self.pyload = core - self.db = DB(self) - self.config = Config(self) - self.info = {} #: Provide information in dict here - self.req = None #: Browser instance, see `network.Browser` + #: Internal modules + self.pyload = core + self.db = DB(self) + self.config = Config(self) + + #: Provide information in dict here + self.info = {} + + #: Browser instance, see `network.Browser` + self.req = self.pyload.requestFactory.getRequest(self.classname) + + #: Last loaded html self.last_html = "" self.last_header = {} @@ -175,7 +182,7 @@ class Plugin(object): url = fixurl(url, unquote=True) #: Recheck in 0.4.10 if req is None: - req = self.req or self.pyload.requestFactory.getRequest(self.classname) + req = self.req #@TODO: Move to network in 0.4.10 if isinstance(cookies, list): |