diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-28 08:15:40 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-28 08:15:40 +0100 |
commit | 9076d20c7bb18cd73466096b20ddfefea28088ef (patch) | |
tree | 76aafabea9d3859dbb4ba2789cedb5e42df6d3ce /module/plugins/internal/Plugin.py | |
parent | Fix password sharing issue (diff) | |
download | pyload-9076d20c7bb18cd73466096b20ddfefea28088ef.tar.xz |
Spare code fixes
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r-- | module/plugins/internal/Plugin.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 9357ea8fb..aa6e90db3 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -18,8 +18,9 @@ except ImportError: import module.plugins.internal.misc as utils +from module.network.RequestFactory import getRequest as get_request from module.plugins.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload as Skip #@TODO: Remove in 0.4.10 -from module.plugins.internal.misc import * #@NOTE: Don't use `*` +from module.plugins.internal.misc import Config, DB, decode, encode, fixurl, format_exc, parse_html_header class Plugin(object): @@ -119,7 +120,6 @@ class Plugin(object): del frame - #@TODO: Move to misc def remove(self, path, trash=False): #@TODO: Change to `trash=True` in 0.4.10 try: remove(path, trash) @@ -181,7 +181,10 @@ class Plugin(object): url = fixurl(url, unquote=True) #: Recheck in 0.4.10 - if req is None: + if req is False: + req = get_request() + + elif not req: req = self.req #@TODO: Move to network in 0.4.10 |