summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-23 22:54:40 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-23 22:54:40 +0200
commit8e89cb7781ec3b135feeb750f6321bbc85e89d67 (patch)
tree9224362d3735953069ceb582cf585c81177cf236 /module/plugins/internal
parentCall error instead fail in some plugins (diff)
downloadpyload-8e89cb7781ec3b135feeb750f6321bbc85e89d67.tar.xz
Fix error method
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleCrypter.py4
-rw-r--r--module/plugins/internal/SimpleHoster.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 6c00a2267..402a641ea 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -165,7 +165,7 @@ class SimpleCrypter(Crypter):
#@TODO: remove in 0.4.10
- def error(self, reason=None, type="parse"):
- raise Fail("%s error%s | Plugin out of date" % (type.capitalize(), ': ' + str(reason) if reason else ""))
+ def error(self, reason="", type="parse"):
if self.core.debug:
print_exc()
+ raise Fail("%s error%s | Plugin may be out of date" % (type.strip().capitalize(), ': ' + reason.strip() if reason else ""))
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index a8a44d953..be3e3c8fc 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -323,7 +323,7 @@ class SimpleHoster(Hoster):
#@TODO: remove in 0.4.10
- def error(self, reason=None, type="parse"):
- raise Fail("%s error%s | Plugin out of date" % (type.capitalize(), ': ' + str(reason) if reason else ""))
+ def error(self, reason="", type="parse"):
if self.core.debug:
print_exc()
+ raise Fail("%s error%s | Plugin may be out of date" % (type.strip().capitalize(), ': ' + reason.strip() if reason else ""))