From 2a3ff4a264c893a03ade23b0c63d193ff9b0d1a0 Mon Sep 17 00:00:00 2001 From: inpos Date: Sun, 13 Mar 2016 17:28:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20normalize=5Fmsg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon.xml | 2 +- lib/pyrrent2http/pyrrent2http.py | 4 ++-- lib/pyrrent2http/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addon.xml b/addon.xml index ca12e97..986facd 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/lib/pyrrent2http/pyrrent2http.py b/lib/pyrrent2http/pyrrent2http.py index d4c29ba..e5f3f2b 100644 --- a/lib/pyrrent2http/pyrrent2http.py +++ b/lib/pyrrent2http/pyrrent2http.py @@ -162,7 +162,7 @@ class TorrentFile(object): return None if self.filePtr is None: while not os.path.exists(self.save_path): - logging.info('Waiting: %s' % (self.save_path,)) + logging.info('Waiting for file: %s' % (self.save_path,)) time.sleep(0.5) self.filePtr = io.open(self.save_path, 'rb') return self.filePtr @@ -595,7 +595,7 @@ class Pyrrent2http(object): def buildTorrentParams(self, uri): try: absPath = uri2path(uri) - 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) except Exception as e: strerror = e.args diff --git a/lib/pyrrent2http/util.py b/lib/pyrrent2http/util.py index 7c96c92..6265271 100644 --- a/lib/pyrrent2http/util.py +++ b/lib/pyrrent2http/util.py @@ -41,7 +41,7 @@ def detect_media_type(name): return MediaType.VIDEO else: return MediaType.UNKNOWN -def normalize_msg(tmpl, *args): +def normalize_msg(tmpl, args): msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding']) arg_ = [] for a in args: