diff --git a/lib/pyrrent2http/pyrrent2http.py b/lib/pyrrent2http/pyrrent2http.py index 42691d1..d00cca3 100644 --- a/lib/pyrrent2http/pyrrent2http.py +++ b/lib/pyrrent2http/pyrrent2http.py @@ -592,7 +592,6 @@ class Pyrrent2http(object): def buildTorrentParams(self, uri): try: absPath = uri2path(uri) - logging.info('absPath: %s' % (repr(absPath))) logging.info(normalize_msg('Opening local torrent file: %s', (absPath,))) torrent_info = lt.torrent_info(absPath) except Exception as e: diff --git a/lib/pyrrent2http/util.py b/lib/pyrrent2http/util.py index 6265271..f788c1d 100644 --- a/lib/pyrrent2http/util.py +++ b/lib/pyrrent2http/util.py @@ -45,7 +45,7 @@ def normalize_msg(tmpl, args): msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding']) arg_ = [] for a in args: - if not isinstance(a, unicode): arg_.append(a.decode(chardet.detect(a)['encoding'])) + arg_.append(isinstance(a, unicode) and a or a.decode(chardet.detect(a)['encoding'])) return msg % tuple(arg_)