summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-17 17:22:59 +0200
committerhut <hut@lavabit.com>2011-10-17 17:22:59 +0200
commite0f34391a01fadd867502cbc440d7f35e77fbd6d (patch)
tree7a0ab84d36f27882b153d6590f089827740b0d2c
parent9b2de75f3289c7a0281cc48bf55248b0ac174a55 (diff)
downloadranger-e0f34391a01fadd867502cbc440d7f35e77fbd6d.tar.gz
ext.spawn: Use shell=True when argument is a string
-rw-r--r--ranger/ext/spawn.py4
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)
ented sorting' href='/akspecs/ranger/commit/TODO?h=v1.8.1&id=e92fe17a449cad78c79a905fd53ec73f8a41051c'>e92fe17a ^
b5493fe4 ^

ef0ee843 ^
0b8a9d79 ^
a6791aee ^
23236d0c ^
08f21ae5 ^
4be8b401 ^




08f21ae5 ^
67bb838c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29