This commit is contained in:
gitadmin committed 2016-03-14 13:03:04 +03:00
1 parent cc633829c0
commit 38cf348400
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -592,7 +592,6 @@ class Pyrrent2http(object):
def buildTorrentParams(self, uri): def buildTorrentParams(self, uri):
try: try:
absPath = uri2path(uri) absPath = uri2path(uri)
logging.info('absPath: %s' % (repr(absPath)))
logging.info(normalize_msg('Opening local torrent file: %s', (absPath,))) logging.info(normalize_msg('Opening local torrent file: %s', (absPath,)))
torrent_info = lt.torrent_info(absPath) torrent_info = lt.torrent_info(absPath)
except Exception as e: except Exception as e:
+1 -1
View File
@@ -45,7 +45,7 @@ def normalize_msg(tmpl, args):
msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding']) msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding'])
arg_ = [] arg_ = []
for a in args: 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_) return msg % tuple(arg_)