summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-09-26 19:47:32 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-09-26 19:47:32 +0100
commitaafb0b9040134b91590a5f4cfb9809fe1d4fa0da (patch)
tree0057a613d2d1443e141d14ab55593bbeec3fca78 /alot/helper.py
parent0da0171a191d4c54ea02fd722c57f1e7195eb65d (diff)
fix encoding issue with abook lookups
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/alot/helper.py b/alot/helper.py
index 606e4f4a..4d941ed4 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -30,6 +30,7 @@ from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
+import urwid
def shorten(string, maxlen):
@@ -141,6 +142,7 @@ def cmd_output(command_line):
args = shlex.split(command_line.encode('ascii', errors='ignore'))
try:
output = subprocess.check_output(args)
+ output = output.decode(urwid.util.detected_encoding)
except subprocess.CalledProcessError:
return None
except OSError: