summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-08-03 22:49:39 +0100
committerpazz <patricktotzke@gmail.com>2011-08-03 22:49:39 +0100
commit7c0153913a04d66049855f4bce081e8aa9de939d (patch)
tree0e0bf22a3f55bf301a37ec6b34bf6c6d284ef865
parenta696bd7c85299cfd538d2f8b8442cb2ba234d3fa (diff)
hotfix issue with shlex and unicode chars
this means that shell commands taken from the config can't include fancy utf8 symbols
-rw-r--r--alot/send.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/send.py b/alot/send.py
index 03d90bf4..02fdc683 100644
--- a/alot/send.py
+++ b/alot/send.py
@@ -57,7 +57,8 @@ class SendmailSender(Sender):
def send_mail(self, mail):
mail['Date'] = email.utils.formatdate(time.time(), True)
- args = shlex.split(self.cmd)
+ args = shlex.split(self.cmd.encode('ascii')) # no unicode in shlex on 2.x
+ logging.info('args:%s' % args)
try:
proc = subprocess.Popen(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,