encode facts coming out of Facts to python string
This commit is contained in:
parent
107b754a0d
commit
ae6eda2c6a
|
@ -81,7 +81,7 @@ class Facts(Module):
|
|||
fact = facts[random.randint(1,len(facts))-1]
|
||||
|
||||
# success
|
||||
return self.reply(connection, replypath, fact['fact'].rstrip())
|
||||
return self.reply(connection, replypath, fact['fact'].rstrip().encode('utf-8', 'ignore'))
|
||||
|
||||
except sqlite3.Error as e:
|
||||
return self.reply(connection, replypath, "sqlite error: " + str(e))
|
||||
|
|
Loading…
Reference in New Issue