Skip to content

Commit 15af530

Browse files
authored
Revert "[execute_process] emulate_tty configurable and defaults to true (ros2#265)" (ros2#276)
This reverts commit 561a23a.
1 parent 36a15e7 commit 15af530

File tree

3 files changed

+1
-147
lines changed

3 files changed

+1
-147
lines changed

launch/examples/disable_emulate_tty_counters.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

launch/launch/actions/execute_process.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
from osrf_pycommon.process_utils import async_execute_process
3939
from osrf_pycommon.process_utils import AsyncSubprocessProtocol
4040

41-
import yaml
42-
4341
from .emit_event import EmitEvent
4442
from .opaque_function import OpaqueFunction
4543
from .timer_action import TimerAction
@@ -97,7 +95,6 @@ def __init__(
9795
'sigterm_timeout', default=5),
9896
sigkill_timeout: SomeSubstitutionsType = LaunchConfiguration(
9997
'sigkill_timeout', default=5),
100-
emulate_tty: bool = True,
10198
prefix: Optional[SomeSubstitutionsType] = None,
10299
output: Text = 'log',
103100
output_format: Text = '[{this.name}] {line}',
@@ -176,8 +173,6 @@ def __init__(
176173
as a string or a list of strings and Substitutions to be resolved
177174
at runtime, defaults to the LaunchConfiguration called
178175
'sigkill_timeout'
179-
:param: emulate_tty emulate a tty (terminal), defaults to
180-
the LaunchConfiguration called 'emulate_tty'
181176
:param: prefix a set of commands/arguments to preceed the cmd, used for
182177
things like gdb/valgrind and defaults to the LaunchConfiguration
183178
called 'launch-prefix'
@@ -216,7 +211,6 @@ def __init__(
216211
self.__shell = shell
217212
self.__sigterm_timeout = normalize_to_list_of_substitutions(sigterm_timeout)
218213
self.__sigkill_timeout = normalize_to_list_of_substitutions(sigkill_timeout)
219-
self.__emulate_tty = emulate_tty
220214
self.__prefix = normalize_to_list_of_substitutions(
221215
LaunchConfiguration('launch-prefix', default='') if prefix is None else prefix
222216
)
@@ -583,16 +577,6 @@ async def __execute_process(self, context: LaunchContext) -> None:
583577
self.__logger.info("process details: cmd=[{}], cwd='{}', custom_env?={}".format(
584578
', '.join(cmd), cwd, 'True' if env is not None else 'False'
585579
))
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
596580
try:
597581
transport, self._subprocess_protocol = await async_execute_process(
598582
lambda **kwargs: self.__ProcessProtocol(
@@ -602,7 +586,7 @@ async def __execute_process(self, context: LaunchContext) -> None:
602586
cwd=cwd,
603587
env=env,
604588
shell=self.__shell,
605-
emulate_tty=emulate_tty,
589+
emulate_tty=False,
606590
stderr_to_stdout=False,
607591
)
608592
except Exception:

launch/test/launch/actions/test_emulate_tty.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)