summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-06 20:48:43 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-06 20:48:43 +0200
commit4ba2cd415edb562b8fd472d97014d719bbe9b687 (patch)
tree3533a59283fa1470162c16a970b226c065a5ecef
parentFix account checkLogin (diff)
downloadpyload-4ba2cd415edb562b8fd472d97014d719bbe9b687.tar.xz
Use Base log methods
-rw-r--r--module/plugins/Crypter.py2
-rw-r--r--module/plugins/Hook.py4
-rw-r--r--module/plugins/Plugin.py14
3 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py
index b2e6528e9..44a47b35b 100644
--- a/module/plugins/Crypter.py
+++ b/module/plugins/Crypter.py
@@ -58,7 +58,7 @@ class Crypter(Plugin):
""" create new packages from self.packages """
for pack in self.packages:
- self.log.debug("Parsed package %(name)s with %(len)d links" % { "name" : pack[0], "len" : len(pack[1]) } )
+ self.logDebug("Parsed package %(name)s with %(len)d links" % { "name" : pack[0], "len" : len(pack[1]) } )
links = [x.decode("utf-8") for x in pack[1]]
diff --git a/module/plugins/Hook.py b/module/plugins/Hook.py
index 31f8d60f4..ef3d978a5 100644
--- a/module/plugins/Hook.py
+++ b/module/plugins/Hook.py
@@ -55,7 +55,7 @@ class Hook(Base):
event_list = None # dont make duplicate entries in event_map
- #: periodic call interval in secondc
+ #: periodic call interval in seconds
interval = 60
def __init__(self, core, manager):
@@ -100,7 +100,7 @@ class Hook(Base):
try:
if self.isActivated(): self.periodical()
except Exception, e:
- self.core.log.error(_("Error executing hooks: %s") % str(e))
+ self.logError(_("Error executing hooks: %s") % str(e))
if self.core.debug:
print_exc()
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 1ba84a762..48b489552 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -393,7 +393,7 @@ class Plugin(Base):
self.fail(_("No captcha result obtained in appropiate time by any of the plugins."))
result = task.result
- self.log.debug("Received captcha result: %s" % str(result))
+ self.logDebug("Received captcha result: %s" % str(result))
if not self.core.debug:
try:
@@ -495,7 +495,7 @@ class Plugin(Base):
chown(location, uid, gid)
except Exception, e:
- self.log.warning(_("Setting User and Group failed: %s") % str(e))
+ self.logWarning(_("Setting User and Group failed: %s") % str(e))
# convert back to unicode
location = fs_decode(location)
@@ -513,7 +513,7 @@ class Plugin(Base):
self.pyfile.size = self.req.size
if disposition and newname and newname != name: #triple check, just to be sure
- self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname})
+ self.logInfo("%(name)s saved as %(newname)s" % {"name": name, "newname": newname})
self.pyfile.name = newname
filename = join(location, newname)
@@ -529,7 +529,7 @@ class Plugin(Base):
chown(fs_filename, uid, gid)
except Exception, e:
- self.log.warning(_("Setting User and Group failed: %s") % str(e))
+ self.logWarning(_("Setting User and Group failed: %s") % str(e))
self.lastDownload = filename
return self.lastDownload
@@ -552,12 +552,12 @@ class Plugin(Base):
if api_size and api_size <= size: return None
elif size > max_size and not read_size: return None
- self.log.debug("Download Check triggered")
+ self.logDebug("Download Check triggered")
f = open(lastDownload, "rb")
content = f.read(read_size if read_size else -1)
f.close()
#produces encoding errors, better log to other file in the future?
- #self.log.debug("Content: %s" % content)
+ #self.logDebug("Content: %s" % content)
for name, rule in rules.iteritems():
if type(rule) in (str, unicode):
if rule in content:
@@ -610,7 +610,7 @@ class Plugin(Base):
if exists(location):
raise SkipDownload(pyfile[0])
- self.log.debug("File %s not skipped, because it does not exists." % self.pyfile.name)
+ self.logDebug("File %s not skipped, because it does not exists." % self.pyfile.name)
def clean(self):
""" clean everything and remove references """