diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-14 18:10:40 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-14 18:10:40 +0200 |
commit | e4077960822e24f3041e16e7e818c105e372152d (patch) | |
tree | 12580f141668f4eb0edf4b90fbf3417e8dcc3a3a /module/plugins/Plugin.py | |
parent | fixes syntax error on old python versions (diff) | |
download | pyload-e4077960822e24f3041e16e7e818c105e372152d.tar.xz |
first version of new extract plugin
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 7c9e7c15c..e503cd6ed 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -82,16 +82,16 @@ class Base(object): #log functions def logInfo(self, *args): - self.log.info("%s: %s" % (self.__name__, " | ".join(args))) + self.log.info("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args]))) def logWarning(self, *args): - self.log.warning("%s: %s" % (self.__name__, " | ".join(args))) + self.log.warning("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args]))) def logError(self, *args): - self.log.error("%s: %s" % (self.__name__, " | ".join(args))) + self.log.error("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args]))) def logDebug(self, *args): - self.log.debug("%s: %s" % (self.__name__, "| ".join(args))) + self.log.debug("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args]))) def setConf(self, option, value): @@ -313,7 +313,7 @@ class Plugin(Base): :param wait_time: time to wait in seconds :param reason: reason for retrying, will be passed to fail if max_tries reached """ - if max_tries > 0 and self.retries >= max_tries: + if 0 < max_tries <= self.retries: if not reason: reason = "Max retries reached" raise Fail(reason) |