summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-21 06:58:59 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-21 17:10:15 +0000
commit5d8ddbdcfd6b3abbb2d62cc03d442cae848ccdf6 (patch)
tree0e4630ac54d10f54120e9c1a79c1583f221594d7 /alot/account.py
parentba5869c3bc779583b40c535342d72d63cae67584 (diff)
split cmdline before calling cmd_output
for abook lookups and html renderer issue #157
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/account.py b/alot/account.py
index 1b7d35e2..ce096b28 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -4,6 +4,7 @@ import time
import re
import email
import os
+import shlex
from ConfigParser import SafeConfigParser
from urlparse import urlparse
@@ -320,7 +321,8 @@ class MatchSdtoutAddressbook(AddressBook):
return self.lookup('\'\'')
def lookup(self, prefix):
- resultstring = cmd_output('%s %s' % (self.command, prefix))
+ cmdlist = shlex.split(self.command.encode('utf-8', errors='ignore'))
+ resultstring = cmd_output(cmdlist + [prefix])
if not resultstring:
return []
lines = resultstring.replace('\t', ' ' * 4).splitlines()