File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,22 @@ def do_behave_run(
156
156
full_run_command += " -k"
157
157
158
158
print (full_run_command )
159
- subprocess .Popen (full_run_command , shell = True )
159
+ if not additional_options or " " not in additional_options :
160
+ subprocess .Popen (full_run_command , shell = True )
161
+ else :
162
+ proc = subprocess .Popen (
163
+ full_run_command , stderr = subprocess .PIPE , shell = True
164
+ )
165
+ (output , error ) = proc .communicate ()
166
+ if error and proc .returncode == 2 :
167
+ if str (error ).startswith ("b'" ) and str (error ).endswith ("\\ n'" ):
168
+ error = str (error )[2 :- 3 ]
169
+ elif str (error ).startswith ("b'" ) and str (error ).endswith ("'" ):
170
+ error = str (error )[2 :- 1 ]
171
+ else :
172
+ error = str (error )
173
+ error = error .replace ("\\ n" , "\n " )
174
+ print (error )
160
175
send_window_to_front (root )
161
176
162
177
You can’t perform that action at this time.
0 commit comments