From ccf6573a4bda4f93ed3328cda165246838e67ebd Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 19 Aug 2010 23:38:56 +0200 Subject: tracking: Fixed unicode handling in lc_callback(). --- modules/tracking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tracking.py b/modules/tracking.py index 89e3d49..4bd58be 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -288,7 +288,7 @@ class Module: session = Session() consignments = session.query(Consignment).filter(Consignment.channel.in_(config.get(self.irc.factory.server, 'channels').split())) for row in consignments: - label = (' (%s)' % row.label.encode('utf-8') if row.label else '') + label = (' (%s)' % row.label if row.label else '') target = row.channel or row.nick target = target.encode('utf-8') removed = False @@ -307,7 +307,7 @@ class Module: code = data[0] last = data[1] desc = data[2] - msg = '%s: \002%s\002%s %s - %s' % (row.nick.encode('utf-8'), package.code.encode('utf-8'), label, last, desc) + msg = '%s: \002%s\002%s %s - %s' % (row.nick.encode('utf-8'), package.code.encode('utf-8'), label.encode('utf-8'), last, desc) if desc.startswith('Sendingen er utlevert'): session.delete(package) msg += ' (Package delivered - tracking stopped)' -- cgit v1.2.3