diff options
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r-- | module/plugins/hooks/DeathByCaptcha.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 38 | ||||
-rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index 050b6fe15..d513c446d 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -135,7 +135,7 @@ class DeathByCaptcha(Hook): def submit(self, captcha, captchaType="file", match=None): - #workaround multipart-post bug in HTTPRequest.py + #@NOTE: Workaround multipart-post bug in HTTPRequest.py if re.match("^\w*$", self.getConfig("passkey")): multipart = True data = (FORM_FILE, captcha) diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index bdbaf64af..f2f4b5207 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -58,7 +58,7 @@ from module.utils import save_join, uniqify class ExtractArchive(Hook): __name__ = "ExtractArchive" __type__ = "hook" - __version__ = "1.04" + __version__ = "1.05" __config__ = [("activated" , "bool" , "Activated" , True ), ("fullpath" , "bool" , "Extract full path" , True ), @@ -305,33 +305,33 @@ class ExtractArchive(Hook): encrypted = True #@TODO: set to `False` passwords = self.getPasswords() - # try: - # self.logInfo(basename(plugin.file), "Verifying...") + try: + self.logInfo(basename(plugin.file), "Verifying...") - # tmp_password = plugin.password - # plugin.password = "" #: Force verifying without password + tmp_password = plugin.password + plugin.password = "" #: Force verifying without password - # plugin.verify() + plugin.verify() - # except PasswordError: - # encrypted = True + except PasswordError: + encrypted = True - # except CRCError: - # self.logWarning(basename(plugin.file), _("Archive damaged")) + except CRCError: + self.logWarning(basename(plugin.file), _("Archive damaged")) - # if not self.getConfig("repair"): - # raise CRCError + if not self.getConfig("repair"): + raise CRCError - # elif plugin.repair(): - # self.logInfo(basename(plugin.file), _("Successfully repaired")) + elif plugin.repair(): + self.logInfo(basename(plugin.file), _("Successfully repaired")) - # elif not self.getConfig("keepbroken"): - # raise ArchiveError(_("Broken archive")) + elif not self.getConfig("keepbroken"): + raise ArchiveError(_("Broken archive")) - # else: - # self.logInfo(basename(plugin.file), _("All OK")) + else: + self.logInfo(basename(plugin.file), _("All OK")) - # plugin.password = tmp_password + plugin.password = tmp_password if not encrypted: plugin.extract(progress) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index 768129e4a..d62fed385 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -82,7 +82,7 @@ class ImageTyperz(Hook): req.c.setopt(LOW_SPEED_TIME, 80) try: - #workaround multipart-post bug in HTTPRequest.py + #@NOTE: Workaround multipart-post bug in HTTPRequest.py if re.match("^\w*$", self.getConfig("passkey")): multipart = True data = (FORM_FILE, captcha) |