diff options
author | hut <hut@lavabit.com> | 2011-10-17 17:22:59 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-10-17 17:22:59 +0200 |
commit | e0f34391a01fadd867502cbc440d7f35e77fbd6d (patch) | |
tree | 7a0ab84d36f27882b153d6590f089827740b0d2c /ranger | |
parent | 9b2de75f3289c7a0281cc48bf55248b0ac174a55 (diff) | |
download | ranger-e0f34391a01fadd867502cbc440d7f35e77fbd6d.tar.gz |
ext.spawn: Use shell=True when argument is a string
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/ext/spawn.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/ext/spawn.py b/ranger/ext/spawn.py index b1f04cf6..5e5d6a95 100644 --- a/ranger/ext/spawn.py +++ b/ranger/ext/spawn.py @@ -20,8 +20,10 @@ def spawn(*args): """Runs a program, waits for its termination and returns its stdout""" if len(args) == 1: popen_arguments = args[0] + shell = isinstance(popen_arguments, str) else: popen_arguments = args - process = Popen(popen_arguments, stdout=PIPE) + shell = False + process = Popen(popen_arguments, stdout=PIPE, shell=shell) stdout, stderr = process.communicate() return stdout.decode(ENCODING) |