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]
|
fact = facts[random.randint(1,len(facts))-1]
|
||||||
|
|
||||||
# success
|
# 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:
|
except sqlite3.Error as e:
|
||||||
return self.reply(connection, replypath, "sqlite error: " + str(e))
|
return self.reply(connection, replypath, "sqlite error: " + str(e))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user