diff options
| author | 2012-01-22 17:49:35 +0100 | |
|---|---|---|
| committer | 2012-01-22 17:49:35 +0100 | |
| commit | 056ff14eb0250cb0da4eae4b980e11525589cf65 (patch) | |
| tree | c62c5f383eaf399c7526a209fc4e1fc0077471d0 /module/plugins/Base.py | |
| parent | try to fix unrar encoding issues (diff) | |
| download | pyload-056ff14eb0250cb0da4eae4b980e11525589cf65.tar.xz | |
encoding fixes
Diffstat (limited to 'module/plugins/Base.py')
| -rw-r--r-- | module/plugins/Base.py | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/module/plugins/Base.py b/module/plugins/Base.py index 48a3707b1..34074095e 100644 --- a/module/plugins/Base.py +++ b/module/plugins/Base.py @@ -18,6 +18,7 @@  """  import sys +from module.utils import decode  from module.utils.fs import exists, makedirs, join  # TODO @@ -101,7 +102,17 @@ class Base(object):          else:              sep = " | " -        getattr(self.log, level)("%s: %s" % (self.__name__, sep.join([a if isinstance(a, basestring) else str(a) for a in args]))) + +        strings = [] +        for obj in args: +            if type(obj) == unicode: +                strings.append(obj) +            elif type(obj) == str: +                strings.append(decode(obj)) +            else: +                strings.append(str(obj)) + +        getattr(self.log, level)("%s: %s" % (self.__name__, sep.join(strings)))      def setConfig(self, option, value):          """ Set config value for current plugin  | 
