From cd6d038427535355b7516df043319b989d0ae961 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sat, 22 Oct 2011 16:05:27 +0100 Subject: use string_decode instead of str.decode --- alot/commands/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alot/commands/__init__.py') diff --git a/alot/commands/__init__.py b/alot/commands/__init__.py index d8f1248f..d8552fbb 100644 --- a/alot/commands/__init__.py +++ b/alot/commands/__init__.py @@ -8,6 +8,7 @@ import argparse import cStringIO import alot.settings +import alot.helper class Command(object): @@ -98,7 +99,7 @@ def commandfactory(cmdline, mode='global'): args = shlex.split(cmdline.encode('utf-8')) except ValueError, e: raise CommandParseError(e.message) - args = map(lambda x: x.decode('utf-8'), args) # get unicode strings + args = map(lambda x: alot.helper.string_decode(x, 'utf-8'), args) logging.debug('ARGS: %s' % args) cmdname = args[0] args = args[1:] -- cgit v1.2.3