diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-19 23:38:56 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-19 23:38:56 +0200 |
commit | ccf6573a4bda4f93ed3328cda165246838e67ebd (patch) | |
tree | ea1785530ea8eb1bd5eaf8023a6c0457288efd97 | |
parent | f737a39aaee66d363701bac9a3df7c1dc085f389 (diff) |
tracking: Fixed unicode handling in lc_callback().
-rw-r--r-- | modules/tracking.py | 4 |
1 files 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)' |