summaryrefslogtreecommitdiff
path: root/alot/commands/__init__.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-22 16:05:27 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-22 16:05:27 +0100
commitcd6d038427535355b7516df043319b989d0ae961 (patch)
tree9bb977f7e63a84920a675d194036a3e1c29511e9 /alot/commands/__init__.py
parent1e8e5770654ef637ff6a8056473389c8c31961a4 (diff)
use string_decode instead of str.decode
Diffstat (limited to 'alot/commands/__init__.py')
-rw-r--r--alot/commands/__init__.py3
1 files changed, 2 insertions, 1 deletions
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:]