mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Hopefully, this will fix the unicode issues we have with Amazon
This commit is contained in:
parent
eabb77abcf
commit
0349d11853
@ -120,7 +120,8 @@ class Amazon(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
else:
|
else:
|
||||||
results['url'] = ' <%s>' % results['url']
|
results['url'] = ' <%s>' % results['url']
|
||||||
s = reply % results
|
s = reply % results
|
||||||
s.encode('utf-8')
|
s = u'%s' % s
|
||||||
|
s = s.encode('utf-8')
|
||||||
res.append(str(s))
|
res.append(str(s))
|
||||||
except amazon.AmazonError, e:
|
except amazon.AmazonError, e:
|
||||||
self.log.warning(str(e))
|
self.log.warning(str(e))
|
||||||
|
@ -40,6 +40,9 @@ if LICENSE_KEY != 'INITIAL_NON_LICENSE_KEY' and network:
|
|||||||
PluginTestCase.setUp(self)
|
PluginTestCase.setUp(self)
|
||||||
conf.supybot.plugins.amazon.licensekey.set(LICENSE_KEY)
|
conf.supybot.plugins.amazon.licensekey.set(LICENSE_KEY)
|
||||||
|
|
||||||
|
def testUnicode(self):
|
||||||
|
self.assertNotError('artist husker du')
|
||||||
|
|
||||||
def testIsbn(self):
|
def testIsbn(self):
|
||||||
self.assertHelp('isbn')
|
self.assertHelp('isbn')
|
||||||
self.assertRegexp('isbn 0738203793',
|
self.assertRegexp('isbn 0738203793',
|
||||||
|
Loading…
Reference in New Issue
Block a user