This commit is contained in:
Valentin Lorentz 2013-03-12 19:36:08 +01:00
parent f4c643ad51
commit 881eb9f771

View File

@ -696,7 +696,7 @@ def topic(channel, topic=None, prefix='', msg=None):
args=(channel,), msg=msg) args=(channel,), msg=msg)
else: else:
if sys.version_info[0] < 3 and isinstance(topic, unicode): if sys.version_info[0] < 3 and isinstance(topic, unicode):
s = s.encode('utf8') topic = topic.encode('utf8')
assert isinstance(topic, str) assert isinstance(topic, str)
return IrcMsg(prefix=prefix, command='TOPIC', return IrcMsg(prefix=prefix, command='TOPIC',
args=(channel, topic), msg=msg) args=(channel, topic), msg=msg)