diff --git a/dr_botzo/dispatch/views.py b/dr_botzo/dispatch/views.py index 394f511..faed9fe 100644 --- a/dr_botzo/dispatch/views.py +++ b/dr_botzo/dispatch/views.py @@ -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" diff --git a/dr_botzo/twitter/ircplugin.py b/dr_botzo/twitter/ircplugin.py index 94057cb..865bad4 100644 --- a/dr_botzo/twitter/ircplugin.py +++ b/dr_botzo/twitter/ircplugin.py @@ -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)