summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExtractArchive.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-22 21:31:19 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-22 21:31:19 +0100
commitcf4ded052964047de88d676045329b8fa4fca2dc (patch)
tree5864aad4f34b273044018393b6bb9be690162050 /module/plugins/hooks/ExtractArchive.py
parent[CaptchaService] Merge together ReCaptcha versions (diff)
downloadpyload-cf4ded052964047de88d676045329b8fa4fca2dc.tar.xz
Update plugins after CaptchaService changes
Diffstat (limited to 'module/plugins/hooks/ExtractArchive.py')
-rw-r--r--module/plugins/hooks/ExtractArchive.py38
1 files changed, 19 insertions, 19 deletions
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)