summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-27 01:38:32 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-27 01:38:32 +0200
commit0d220d634e512d89bda540f91c643b361c82ea8a (patch)
tree198e2be046a1d6fdbbec0b7c44f1d5563f327528 /module/plugins/internal
parentBetter dead plugin fallback (diff)
downloadpyload-0d220d634e512d89bda540f91c643b361c82ea8a.tar.xz
Logging string cosmetics
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/MultiHoster.py16
-rw-r--r--module/plugins/internal/SimpleCrypter.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py9
3 files changed, 13 insertions, 14 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index f6d202ee9..7f1bb5103 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -40,7 +40,7 @@ class MultiHoster(Hook):
try:
hosterSet = self.toHosterSet(self.getHoster()) - set(self.ignored)
except Exception, e:
- self.logError("%s" % str(e))
+ self.logError(e)
return []
try:
@@ -54,7 +54,7 @@ class MultiHoster(Hook):
hosterSet -= configSet
except Exception, e:
- self.logError("%s" % str(e))
+ self.logError(e)
self.hosters = list(hosterSet)
@@ -98,7 +98,7 @@ class MultiHoster(Hook):
def periodical(self):
"""reload hoster list periodically"""
- self.logInfo("Reloading supported hoster list")
+ self.logInfo(_("Reloading supported hoster list"))
old_supported = self.supported
self.supported, self.new_supported, self.hosters = [], [], []
@@ -107,7 +107,7 @@ class MultiHoster(Hook):
old_supported = [hoster for hoster in old_supported if hoster not in self.supported]
if old_supported:
- self.logDebug("UNLOAD: %s" % ", ".join(old_supported))
+ self.logDebug("UNLOAD", ", ".join(old_supported))
for hoster in old_supported:
self.unloadHoster(hoster)
@@ -138,24 +138,24 @@ class MultiHoster(Hook):
klass = getattr(module, self.__name__)
# inject plugin plugin
- self.logDebug("Overwritten Hosters: %s" % ", ".join(sorted(self.supported)))
+ self.logDebug("Overwritten Hosters", ", ".join(sorted(self.supported)))
for hoster in self.supported:
dict = self.core.pluginManager.hosterPlugins[hoster]
dict['new_module'] = module
dict['new_name'] = self.__name__
if excludedList:
- self.logInfo("The following hosters were not overwritten - account exists: %s" % ", ".join(sorted(excludedList)))
+ self.logInfo(_("The following hosters were not overwritten - account exists"), ", ".join(sorted(excludedList)))
if self.new_supported:
- self.logDebug("New Hosters: %s" % ", ".join(sorted(self.new_supported)))
+ self.logDebug("New Hosters", ", ".join(sorted(self.new_supported)))
# create new regexp
regexp = r".*(%s).*" % "|".join([x.replace(".", "\\.") for x in self.new_supported])
if hasattr(klass, "__pattern__") and isinstance(klass.__pattern__, basestring) and '://' in klass.__pattern__:
regexp = r"%s|%s" % (klass.__pattern__, regexp)
- self.logDebug("Regexp: %s" % regexp)
+ self.logDebug("Regexp", regexp)
dict = self.core.pluginManager.hosterPlugins[self.__name__]
dict['pattern'] = regexp
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 184ba66c9..a4134dcc0 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -83,7 +83,7 @@ class SimpleCrypter(Crypter):
if hasattr(self, 'PAGES_PATTERN') and hasattr(self, 'loadPage'):
self.handleMultiPages()
- self.logDebug('Package has %d links' % len(self.package_links))
+ self.logDebug("Package has %d links" % len(self.package_links))
if self.package_links:
self.packages = [(package_name, self.package_links, folder_name)]
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 6ecb2d9f2..c18bfff15 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -15,7 +15,6 @@ def replace_patterns(string, ruleslist):
for r in ruleslist:
rf, rt = r
string = re.sub(rf, rt, string)
- #self.logDebug(rf, rt, string)
return string
@@ -230,7 +229,7 @@ class SimpleHoster(Hoster):
def getFileInfo(self):
- self.logDebug("URL: %s" % self.pyfile.url)
+ self.logDebug("URL", self.pyfile.url)
name, size, status = parseFileInfo(self)[:3]
@@ -250,7 +249,7 @@ class SimpleHoster(Hoster):
if size:
self.pyfile.size = size
else:
- self.logError("File size not parsed")
+ self.logError(_("File size not parsed"))
self.logDebug("FILE NAME: %s FILE SIZE: %s" % (self.pyfile.name, self.pyfile.size))
return self.file_info
@@ -276,7 +275,7 @@ class SimpleHoster(Hoster):
time_str = "(unknown time)"
max_tries = 100
- self.logInfo("Download limit reached, reconnect or wait %s" % time_str)
+ self.logInfo(_("Download limit reached, reconnect or wait %s") % time_str)
self.setWait(wait_time, True)
self.wait()
@@ -292,7 +291,7 @@ class SimpleHoster(Hoster):
if traffic == -1:
return True
size = self.pyfile.size / 1024
- self.logInfo("Filesize: %i KiB, Traffic left for user %s: %i KiB" % (size, self.user, traffic))
+ self.logInfo(_("Filesize: %i KiB, Traffic left for user %s: %i KiB") % (size, self.user, traffic))
return size <= traffic