diff options
author | Antoine Amarilli <a3nm@a3nm.net> | 2011-11-06 20:09:45 +0100 |
---|---|---|
committer | Antoine Amarilli <a3nm@a3nm.net> | 2011-11-06 20:18:26 +0100 |
commit | d44b74d6d6058570c6a60630e74d563fed818bc8 (patch) | |
tree | ee4f0f945a24ffe44ae615fa13c5e6abfd5a124a /alot/helper.py | |
parent | 27f73361928b6ee794fa94edb0502890b5e0c044 (diff) |
fix handling of multiword pipeto commands
Diffstat (limited to 'alot/helper.py')
-rw-r--r-- | alot/helper.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/alot/helper.py b/alot/helper.py index 18a10d42..c43beba5 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -206,6 +206,9 @@ def cmd_output(command_line): def pipe_to_command(cmd, stdin): + # remove quotes which have been put around the whole command + if cmd[0] == '"' and cmd[-1] == '"': + cmd = cmd[1:-1] args = shlex.split(cmd.encode('utf-8', errors='ignore')) try: proc = subprocess.Popen(args, stdin=subprocess.PIPE, |