From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hooks/ExtractArchive.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hooks/ExtractArchive.py') diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 649689f6e..8164b3157 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, e) + self.logWarning(_("Could not activate %s") % p, repr(e)) if self.core.debug: print_exc() except Exception, e: - self.logWarning(_("Could not activate %s") % p, e) + self.logWarning(_("Could not activate %s") % p, repr(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), e) + self.logError(basename(target), repr(e)) success = False continue @@ -289,13 +289,13 @@ class ExtractArchive(Hook): return extracted_files except ArchiveError, e: - self.logError(basename(plugin.file), _("Archive Error"), e) + self.logError(basename(plugin.file), _("Archive Error"), repr(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"), e) + self.logError(basename(plugin.file), _("Unknown Error"), repr(e)) self.manager.dispatchEvent("archive_extract_failed", pyfile) raise Exception(_("Extract failed")) @@ -352,4 +352,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"), e) + self.logWarning(_("Setting User and Group failed"), repr(e)) -- cgit v1.2.3