38
38
from osrf_pycommon .process_utils import async_execute_process
39
39
from osrf_pycommon .process_utils import AsyncSubprocessProtocol
40
40
41
- import yaml
42
-
43
41
from .emit_event import EmitEvent
44
42
from .opaque_function import OpaqueFunction
45
43
from .timer_action import TimerAction
@@ -97,7 +95,6 @@ def __init__(
97
95
'sigterm_timeout' , default = 5 ),
98
96
sigkill_timeout : SomeSubstitutionsType = LaunchConfiguration (
99
97
'sigkill_timeout' , default = 5 ),
100
- emulate_tty : bool = True ,
101
98
prefix : Optional [SomeSubstitutionsType ] = None ,
102
99
output : Text = 'log' ,
103
100
output_format : Text = '[{this.name}] {line}' ,
@@ -176,8 +173,6 @@ def __init__(
176
173
as a string or a list of strings and Substitutions to be resolved
177
174
at runtime, defaults to the LaunchConfiguration called
178
175
'sigkill_timeout'
179
- :param: emulate_tty emulate a tty (terminal), defaults to
180
- the LaunchConfiguration called 'emulate_tty'
181
176
:param: prefix a set of commands/arguments to preceed the cmd, used for
182
177
things like gdb/valgrind and defaults to the LaunchConfiguration
183
178
called 'launch-prefix'
@@ -216,7 +211,6 @@ def __init__(
216
211
self .__shell = shell
217
212
self .__sigterm_timeout = normalize_to_list_of_substitutions (sigterm_timeout )
218
213
self .__sigkill_timeout = normalize_to_list_of_substitutions (sigkill_timeout )
219
- self .__emulate_tty = emulate_tty
220
214
self .__prefix = normalize_to_list_of_substitutions (
221
215
LaunchConfiguration ('launch-prefix' , default = '' ) if prefix is None else prefix
222
216
)
@@ -583,16 +577,6 @@ async def __execute_process(self, context: LaunchContext) -> None:
583
577
self .__logger .info ("process details: cmd=[{}], cwd='{}', custom_env?={}" .format (
584
578
', ' .join (cmd ), cwd , 'True' if env is not None else 'False'
585
579
))
586
- try :
587
- emulate_tty = yaml .safe_load (
588
- context .launch_configurations ['emulate_tty' ]
589
- )
590
- if type (emulate_tty ) is not bool :
591
- raise TypeError ('emulate_tty is not boolean [{}]' .format (
592
- type (emulate_tty )
593
- ))
594
- except KeyError :
595
- emulate_tty = self .__emulate_tty
596
580
try :
597
581
transport , self ._subprocess_protocol = await async_execute_process (
598
582
lambda ** kwargs : self .__ProcessProtocol (
@@ -602,7 +586,7 @@ async def __execute_process(self, context: LaunchContext) -> None:
602
586
cwd = cwd ,
603
587
env = env ,
604
588
shell = self .__shell ,
605
- emulate_tty = emulate_tty ,
589
+ emulate_tty = False ,
606
590
stderr_to_stdout = False ,
607
591
)
608
592
except Exception :
0 commit comments