From a34f731c8204d8a204ff85c0665a5b46e779d63b Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 13 Oct 2014 19:55:25 +0200 Subject: [PATCH] Unicode fix ? --- parrot.py | 2 +- quotes.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parrot.py b/parrot.py index 0cd5be9..c948dfe 100755 --- a/parrot.py +++ b/parrot.py @@ -502,7 +502,7 @@ class Parrot(ircbot.SingleServerIRCBot): victime = ev.arguments()[0] raison = ev.arguments()[1] if victime == self.nick: - log(self.serveur, "%s kické de %s par %s (raison : %s)" % (victime, channel, auteur, raison)) + log(self.serveur, ("%s kické de %s par %s (raison : %s)" % (victime, channel, auteur, raison)).decode("utf-8")) time.sleep(2) serv.join(channel) diff --git a/quotes.py b/quotes.py index f6e4bc3..39e048d 100644 --- a/quotes.py +++ b/quotes.py @@ -148,6 +148,7 @@ class QuoteDB(object): def random(self): """ Sort une quote aléatoire """ return random.choice(self.quotelist) + def quotesfrom(self, author): """ Sort toutes les quotes de ``author`` """ return [q for q in self.quotelist if q.author == author] -- 2.39.2