From ff3ef576b7afc76eefc955db7710859091e90326 Mon Sep 17 00:00:00 2001 From: Dabo Ross Date: Thu, 27 Mar 2014 10:30:30 -0700 Subject: [PATCH] Fix unicode support for dictionary.py --- plugins/dictionary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/dictionary.py b/plugins/dictionary.py index b13db4b..5b4123b 100644 --- a/plugins/dictionary.py +++ b/plugins/dictionary.py @@ -19,10 +19,10 @@ def define(inp): '//div[@class="example"]') if not definition: - return 'No results for ' + inp + ' :(' + return u'No results for {} :('.format(inp) def format_output(show_examples): - result = '{}: '.format(h.xpath('//dt[@class="title-word"]/a/text()')[0]) + result = u'{}: '.format(h.xpath('//dt[@class="title-word"]/a/text()')[0]) correction = h.xpath('//span[@class="correct-word"]/text()') if correction: @@ -77,7 +77,7 @@ def etymology(inp): etym = h.xpath('//dl') if not etym: - return 'No etymology found for {} :('.format(inp) + return u'No etymology found for {} :('.format(inp) etym = etym[0].text_content()