summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleCrypter.py15
-rw-r--r--module/plugins/internal/SimpleHoster.py9
2 files changed, 14 insertions, 10 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index e2e08bb1b..2ea8d302b 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -2,6 +2,8 @@
import re
+from traceback import print_exc
+
from module.network.RequestFactory import getURL
from module.plugins.Crypter import Crypter
from module.plugins.Plugin import Fail
@@ -12,7 +14,7 @@ from module.utils import fixup, html_unescape
class SimpleCrypter(Crypter):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = None
@@ -65,6 +67,7 @@ class SimpleCrypter(Crypter):
LOGIN_PREMIUM = False
+ #@TODO: remove in 0.4.10
def init(self):
account_name = (self.__name__ + ".py").replace("Folder.py", "").replace(".py", "")
account = self.core.accountManager.getAccountPlugin(account_name)
@@ -128,7 +131,7 @@ class SimpleCrypter(Crypter):
def getPackageNameAndFolder(self):
if isinstance(self.TEXT_ENCODING, basestring):
- self.html = unicode(html, self.TEXT_ENCODING)
+ self.html = unicode(self.html, self.TEXT_ENCODING)
if hasattr(self, 'TITLE_PATTERN'):
try:
@@ -160,8 +163,8 @@ class SimpleCrypter(Crypter):
self.package_links += self.getLinks()
+ #@TODO: remove in 0.4.10
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())
+ raise Fail("%s error%s | Plugin out of date" % (type.capitalize(), ':' + str(reason) if reason else ""))
+ if self.core.debug:
+ print_exc()
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 74910692f..17543ba8d 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -3,6 +3,7 @@
import re
from time import time
+from traceback import print_exc
from urlparse import urlparse
from module.network.CookieJar import CookieJar
@@ -321,8 +322,8 @@ class SimpleHoster(Hoster):
super(SimpleHoster, self).wait()
+ #@TODO: remove in 0.4.10
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())
+ raise Fail("%s error%s | Plugin out of date" % (type.capitalize(), ':' + str(reason) if reason else ""))
+ if self.core.debug:
+ print_exc()