File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1515import typing as t
1616
1717from . import exc
18- from ._compat import LooseVersion , console_to_str , str_from_console
18+ from ._compat import LooseVersion , str_from_console
1919
2020if t .TYPE_CHECKING :
2121 from collections .abc import Callable
@@ -235,6 +235,7 @@ def __init__(self, *args: t.Any) -> None:
235235 cmd ,
236236 stdout = subprocess .PIPE ,
237237 stderr = subprocess .PIPE ,
238+ text = True ,
238239 )
239240 stdout , stderr = self .process .communicate ()
240241 returncode = self .process .returncode
@@ -244,14 +245,12 @@ def __init__(self, *args: t.Any) -> None:
244245
245246 self .returncode = returncode
246247
247- stdout_str = console_to_str (stdout )
248- stdout_split = stdout_str .split ("\n " )
248+ stdout_split = stdout .split ("\n " )
249249 # remove trailing newlines from stdout
250250 while stdout_split and stdout_split [- 1 ] == "" :
251251 stdout_split .pop ()
252252
253- stderr_str = console_to_str (stderr )
254- stderr_split = stderr_str .split ("\n " )
253+ stderr_split = stderr .split ("\n " )
255254 self .stderr = list (filter (None , stderr_split )) # filter empty values
256255
257256 if "has-session" in cmd and len (self .stderr ) and not stdout_split :
You can’t perform that action at this time.
0 commit comments