diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-19 15:11:18 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-19 15:11:18 +0200 |
commit | 4bfdf03e804fcafabab0ff08b2b6ef1daec2cf91 (patch) | |
tree | dd9bf90a993c33aa1843905696d75b22b63ce631 /module/plugins/internal/SimpleCrypter.py | |
parent | Update hosters to self.error (diff) | |
download | pyload-4bfdf03e804fcafabab0ff08b2b6ef1daec2cf91.tar.xz |
Improve error method
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index b45e503d5..f1def8118 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -157,5 +157,8 @@ class SimpleCrypter(Crypter): self.package_links += self.getLinks() - def error(self, reason): - raise Fail("Parse error (%s) - crypter plugin may be out of date" % reason) + def error(self, reason=None, type="parse"): + if reason: + raise Fail("%s error: %s | Plugin may be out of date" % (type.capitalize(), reason)) + else: + raise Fail("%s error | Plugin out of date" % type.capitalize()) |