File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 55import inspect
66import subprocess
77import threading
8- import shlex
98import sys
109import shutil
1110import string
1211import unittest
1312
1413
1514if sys .platform == 'win32' :
16- #: invoke subprocess.Popen with shell=True on Windows
17- _SUBPROCESS_SHELL = True
18-
19- def _cmd_splitter (cmd ):
20- return cmd
21-
2215 def _process_output_post (output ):
2316 return output .replace ('\r \n ' , '\n ' )
2417
2518else :
26- #: invoke subprocess.Popen with shell=False on Unix
27- _SUBPROCESS_SHELL = False
28-
29- def _cmd_splitter (cmd ):
30- return shlex .split (cmd )
31-
3219 def _process_output_post (output ):
3320 return output
3421
@@ -551,13 +538,13 @@ def test_run(self):
551538 )
552539
553540 proc = subprocess .Popen (
554- _cmd_splitter ( command ) ,
541+ command ,
555542 stdout = subprocess .PIPE ,
556543 stderr = subprocess .PIPE ,
557544 stdin = subprocess .PIPE if stdin is not None else None ,
558545 env = self ._get_env (),
559546 cwd = self .work_dir ,
560- shell = _SUBPROCESS_SHELL
547+ shell = True ,
561548 )
562549
563550 # Setup a threading.Timer which will terminate the command if it takes
You can’t perform that action at this time.
0 commit comments