summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExtractArchive.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 00:19:51 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 00:19:51 +0100
commitc9e31d875d32de31e54959b82bc35eff2b3e0f3f (patch)
tree5022eadf2ac5c65ba075f172af873b737310ed66 /module/plugins/hooks/ExtractArchive.py
parent[Keep2shareCc] Fix account __name__ (diff)
downloadpyload-c9e31d875d32de31e54959b82bc35eff2b3e0f3f.tar.xz
Code cosmetics
Diffstat (limited to 'module/plugins/hooks/ExtractArchive.py')
-rw-r--r--module/plugins/hooks/ExtractArchive.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index f5f30fc52..11c44a6d1 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -98,12 +98,12 @@ class ExtractArchive(Hook):
if e.errno == 2:
self.logInfo(_("No %s installed") % p)
else:
- self.logWarning(_("Could not activate %s") % p, str(e))
+ self.logWarning(_("Could not activate %s") % p, e)
if self.core.debug:
print_exc()
except Exception, e:
- self.logWarning(_("Could not activate %s") % p, str(e))
+ self.logWarning(_("Could not activate %s") % p, e)
if self.core.debug:
print_exc()
@@ -202,7 +202,7 @@ class ExtractArchive(Hook):
password = p.password.strip().splitlines()
new_files = self._extract(klass, fid, password, thread)
except Exception, e:
- self.logError(basename(target), str(e))
+ self.logError(basename(target), e)
success = False
continue
@@ -289,13 +289,13 @@ class ExtractArchive(Hook):
return extracted_files
except ArchiveError, e:
- self.logError(basename(plugin.file), _("Archive Error"), str(e))
+ self.logError(basename(plugin.file), _("Archive Error"), e)
except CRCError:
self.logError(basename(plugin.file), _("CRC Mismatch"))
except Exception, e:
if self.core.debug:
print_exc()
- self.logError(basename(plugin.file), _("Unknown Error"), str(e))
+ self.logError(basename(plugin.file), _("Unknown Error"), e)
self.manager.dispatchEvent("archive_extract_failed", pyfile)
raise Exception(_("Extract failed"))
@@ -317,7 +317,7 @@ class ExtractArchive(Hook):
passwords.append(pw)
except IOError, e:
- self.logError(str(e))
+ self.logError(e)
else:
self.passwords = passwords
@@ -338,7 +338,7 @@ class ExtractArchive(Hook):
for pw in self.passwords:
f.write(pw + "\n")
except IOError, e:
- self.logError(str(e))
+ self.logError(e)
def setPermissions(self, files):
@@ -357,4 +357,4 @@ class ExtractArchive(Hook):
gid = getgrnam(self.config['permission']['group'])[2]
chown(f, uid, gid)
except Exception, e:
- self.logWarning(_("Setting User and Group failed"), str(e))
+ self.logWarning(_("Setting User and Group failed"), e)