diff options
author | 2015-09-21 23:35:58 +0200 | |
---|---|---|
committer | 2015-09-21 23:35:58 +0200 | |
commit | 34244c7a49b099d30456e0bd80cf26a2be3a3208 (patch) | |
tree | 306e77f19f37eb8f1af775c321c9df8de6b394c0 /module/plugins/internal/Plugin.py | |
parent | [FastixRu] Fixup (diff) | |
download | pyload-34244c7a49b099d30456e0bd80cf26a2be3a3208.tar.xz |
Spare improvements and fixes (2)
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r-- | module/plugins/internal/Plugin.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 118b68812..e9964b11d 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -7,9 +7,8 @@ import inspect import os import re import sys -import unicodedata +import traceback import urllib -import urlparse if os.name != "nt": import grp @@ -180,7 +179,7 @@ def chunks(iterable, size): class Plugin(object): __name__ = "Plugin" __type__ = "plugin" - __version__ = "0.34" + __version__ = "0.35" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -227,24 +226,31 @@ class Plugin(object): def log_debug(self, *args): - if self.pyload.debug: - return self._log("debug", self.__type__, self.__name__, args) + if not self.pyload.debug: + return + self._log("debug", self.__type__, self.__name__, args) def log_info(self, *args): - return self._log("info", self.__type__, self.__name__, args) + self._log("info", self.__type__, self.__name__, args) def log_warning(self, *args): - return self._log("warning", self.__type__, self.__name__, args) + self._log("warning", self.__type__, self.__name__, args) + if self.pyload.debug: + traceback.print_exc() def log_error(self, *args): - return self._log("error", self.__type__, self.__name__, args) + self._log("error", self.__type__, self.__name__, args) + if self.pyload.debug: + traceback.print_exc() def log_critical(self, *args): return self._log("critical", self.__type__, self.__name__, args) + if self.pyload.debug: + traceback.print_exc() def set_permissions(self, path): |