From c1d652f22a8f90cacb6749b1661c6ff87ffa625b Mon Sep 17 00:00:00 2001 From: Armin Date: Sun, 12 Apr 2015 17:58:45 +0200 Subject: fix, fix and more fixes --- pyload/manager/thread/Decrypter.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'pyload/manager/thread/Decrypter.py') diff --git a/pyload/manager/thread/Decrypter.py b/pyload/manager/thread/Decrypter.py index 51544d1b9..7fcf93e4c 100644 --- a/pyload/manager/thread/Decrypter.py +++ b/pyload/manager/thread/Decrypter.py @@ -19,6 +19,7 @@ from pyload.plugin.Plugin import Abort, Fail, Retry class DecrypterThread(PluginThread): + """thread for decrypting""" def __init__(self, manager, pyfile): @@ -42,12 +43,13 @@ class DecrypterThread(PluginThread): retry = False try: - self.m.log.info(_("Decrypting starts: %s") % pyfile.name) + self.m.core.log.info(_("Decrypting starts: %s") % pyfile.name) pyfile.error = "" pyfile.plugin.preprocessing(self) except NotImplementedError: - self.m.log.error(_("Plugin %s is missing a function.") % pyfile.pluginname) + self.m.core.log.error( + _("Plugin %s is missing a function.") % pyfile.pluginname) return except Fail, e: @@ -55,10 +57,12 @@ class DecrypterThread(PluginThread): if msg == "offline": pyfile.setStatus("offline") - self.m.log.warning(_("Download is offline: %s") % pyfile.name) + self.m.core.log.warning( + _("Download is offline: %s") % pyfile.name) else: pyfile.setStatus("failed") - self.m.log.error(_("Decrypting failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg}) + self.m.core.log.error( + _("Decrypting failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg}) pyfile.error = msg if self.m.core.debug: @@ -66,7 +70,7 @@ class DecrypterThread(PluginThread): return except Abort: - self.m.log.info(_("Download aborted: %s") % pyfile.name) + self.m.core.log.info(_("Download aborted: %s") % pyfile.name) pyfile.setStatus("aborted") if self.m.core.debug: @@ -74,13 +78,14 @@ class DecrypterThread(PluginThread): return except Retry: - self.m.log.info(_("Retrying %s") % pyfile.name) + self.m.core.log.info(_("Retrying %s") % pyfile.name) retry = True return self.run() except Exception, e: pyfile.setStatus("failed") - self.m.log.error(_("Decrypting failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": str(e)}) + self.m.core.log.error(_("Decrypting failed: %(name)s | %(msg)s") % { + "name": pyfile.name, "msg": str(e)}) pyfile.error = str(e) if self.m.core.debug: -- cgit v1.2.3 From 3a82d5f45ffed16d654220efa92ef6b75ea3163b Mon Sep 17 00:00:00 2001 From: Armin Date: Sun, 12 Apr 2015 18:34:55 +0200 Subject: import fixes + code-cleanup --- pyload/manager/thread/Decrypter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pyload/manager/thread/Decrypter.py') diff --git a/pyload/manager/thread/Decrypter.py b/pyload/manager/thread/Decrypter.py index 7fcf93e4c..12806163c 100644 --- a/pyload/manager/thread/Decrypter.py +++ b/pyload/manager/thread/Decrypter.py @@ -48,8 +48,7 @@ class DecrypterThread(PluginThread): pyfile.plugin.preprocessing(self) except NotImplementedError: - self.m.core.log.error( - _("Plugin %s is missing a function.") % pyfile.pluginname) + self.m.core.log.error(_("Plugin %s is missing a function.") % pyfile.pluginname) return except Fail, e: -- cgit v1.2.3