ChannelLogger: Fix Python 2 compatibility.

This commit is contained in:
Valentin Lorentz 2014-02-17 16:01:31 +00:00
parent 066c6d87c8
commit 98076482b6
1 changed files with 4 additions and 2 deletions

View File

@ -162,8 +162,10 @@ class ChannelLogger(callbacks.Plugin):
def timestamp(self, log):
format = conf.supybot.log.timestampFormat()
if format:
log.write(time.strftime(format))
log.write(' ')
string = time.strftime(format) + ' '
if sys.version_info[0] < 3:
string = string.decode()
log.write(string)
def normalizeChannel(self, irc, channel):
return ircutils.toLower(channel)