Merge branch 'py3' into 'master'
Py3 - Remove a couple unnecessary UTF8 encodes See merge request !3
This commit is contained in:
commit
702a2de4c6
@ -90,8 +90,7 @@ class DispatchMessage(generics.GenericAPIView):
|
||||
filename = os.path.abspath(action.destination)
|
||||
log.debug("sending '%s' to file %s", text, filename)
|
||||
with open(filename, 'w') as f:
|
||||
f.write(text.encode('utf8'))
|
||||
f.write(b'\n')
|
||||
f.write(text + '\n')
|
||||
|
||||
new_data = copy.deepcopy(message.data)
|
||||
new_data['status'] = "OK"
|
||||
|
@ -166,7 +166,7 @@ class Twitter(Plugin):
|
||||
return self.bot.reply(event, "you do not have permission to send tweets.")
|
||||
|
||||
replyee_tweet = self.twit.show_status(id=status_id)
|
||||
target = replyee_tweet['user']['screen_name'].encode('utf-8', 'ignore')
|
||||
target = replyee_tweet['user']['screen_name']
|
||||
|
||||
try:
|
||||
reptweet = "@{0:s}: {1:s}".format(target, tweet)
|
||||
|
Loading…
Reference in New Issue
Block a user