Skip to content

Commit

Permalink
Revert "[execute_process] emulate_tty configurable and defaults to tr…
Browse files Browse the repository at this point in the history
…ue (#265)" (#276)

This reverts commit 561a23a.
  • Loading branch information
wjwwood authored Jul 18, 2019
1 parent 36a15e7 commit 15af530
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 147 deletions.
60 changes: 0 additions & 60 deletions launch/examples/disable_emulate_tty_counters.py

This file was deleted.

18 changes: 1 addition & 17 deletions launch/launch/actions/execute_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
from osrf_pycommon.process_utils import async_execute_process
from osrf_pycommon.process_utils import AsyncSubprocessProtocol

import yaml

from .emit_event import EmitEvent
from .opaque_function import OpaqueFunction
from .timer_action import TimerAction
Expand Down Expand Up @@ -97,7 +95,6 @@ def __init__(
'sigterm_timeout', default=5),
sigkill_timeout: SomeSubstitutionsType = LaunchConfiguration(
'sigkill_timeout', default=5),
emulate_tty: bool = True,
prefix: Optional[SomeSubstitutionsType] = None,
output: Text = 'log',
output_format: Text = '[{this.name}] {line}',
Expand Down Expand Up @@ -176,8 +173,6 @@ def __init__(
as a string or a list of strings and Substitutions to be resolved
at runtime, defaults to the LaunchConfiguration called
'sigkill_timeout'
:param: emulate_tty emulate a tty (terminal), defaults to
the LaunchConfiguration called 'emulate_tty'
:param: prefix a set of commands/arguments to preceed the cmd, used for
things like gdb/valgrind and defaults to the LaunchConfiguration
called 'launch-prefix'
Expand Down Expand Up @@ -216,7 +211,6 @@ def __init__(
self.__shell = shell
self.__sigterm_timeout = normalize_to_list_of_substitutions(sigterm_timeout)
self.__sigkill_timeout = normalize_to_list_of_substitutions(sigkill_timeout)
self.__emulate_tty = emulate_tty
self.__prefix = normalize_to_list_of_substitutions(
LaunchConfiguration('launch-prefix', default='') if prefix is None else prefix
)
Expand Down Expand Up @@ -583,16 +577,6 @@ async def __execute_process(self, context: LaunchContext) -> None:
self.__logger.info("process details: cmd=[{}], cwd='{}', custom_env?={}".format(
', '.join(cmd), cwd, 'True' if env is not None else 'False'
))
try:
emulate_tty = yaml.safe_load(
context.launch_configurations['emulate_tty']
)
if type(emulate_tty) is not bool:
raise TypeError('emulate_tty is not boolean [{}]'.format(
type(emulate_tty)
))
except KeyError:
emulate_tty = self.__emulate_tty
try:
transport, self._subprocess_protocol = await async_execute_process(
lambda **kwargs: self.__ProcessProtocol(
Expand All @@ -602,7 +586,7 @@ async def __execute_process(self, context: LaunchContext) -> None:
cwd=cwd,
env=env,
shell=self.__shell,
emulate_tty=emulate_tty,
emulate_tty=False,
stderr_to_stdout=False,
)
except Exception:
Expand Down
70 changes: 0 additions & 70 deletions launch/test/launch/actions/test_emulate_tty.py

This file was deleted.

0 comments on commit 15af530

Please sign in to comment.