From 5d8ddbdcfd6b3abbb2d62cc03d442cae848ccdf6 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Wed, 21 Dec 2011 06:58:59 +0000 Subject: split cmdline before calling cmd_output for abook lookups and html renderer issue #157 --- alot/account.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'alot/account.py') 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() -- cgit v1.2.3