From f4a057cf4b7253143b235e6b91ad68faae3e0c5c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 28 Aug 2003 17:56:27 +0000 Subject: [PATCH] Changed binascii.hexlify to encode('hex_codec'). --- plugins/FunCommands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index 98689137b..4afac7531 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -52,7 +52,6 @@ import string import random import urllib import inspect -import binascii import telnetlib import threading import mimetypes @@ -281,7 +280,7 @@ class FunCommands(callbacks.Privmsg): composed of the hexadecimal value of each character in the string """ text = privmsgs.getArgs(args) - irc.reply(msg, binascii.hexlify(text)) + irc.reply(msg, text.encode('hex_codec')) def unhexlify(self, irc, msg, args): """ @@ -291,8 +290,7 @@ class FunCommands(callbacks.Privmsg): """ text = privmsgs.getArgs(args) try: - s = binascii.unhexlify(text) - irc.reply(msg, s) + irc.reply(msg, text.decode('hex_codec')) except TypeError: irc.error(msg, 'Invalid input.')