From 00ea635a0528619c0ff2f09e8781418f4207504e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 16 Jan 2012 21:07:09 +0100 Subject: unicode fix --- tests/HosterPluginTester.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/HosterPluginTester.py b/tests/HosterPluginTester.py index 23e9507f1..2dd674367 100644 --- a/tests/HosterPluginTester.py +++ b/tests/HosterPluginTester.py @@ -96,6 +96,7 @@ class HosterPluginTester(PluginTester): c = Core() +# decode everything as unicode f = codecs.open(join(dirname(__file__), "hosterlinks.txt"), "r", "utf_8") links = [x.strip() for x in f.readlines()] urls = [] @@ -106,12 +107,12 @@ for l in links: if l.startswith("http"): if "||" in l: l, flag = l.split("||") - flags[l] = flag.strip() + flags[l] = str(flag.strip()) urls.append(l) elif len(l.rsplit(" ", 1)) == 2: name, hash = l.rsplit(" ", 1) - HosterPluginTester.files[name] = hash + HosterPluginTester.files[name] = str(hash) hoster, c = c.pluginManager.parseUrls(urls) @@ -147,4 +148,4 @@ for plugin, urls in plugins.iteritems(): #register class locals()[plugin] = _testerClass # remove from locals, or tested twice - del _testerClass \ No newline at end of file + del _testerClass -- cgit v1.2.3