From ceae858f099699db0a183707c9fa500a9ce06832 Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Fri, 9 Jul 2021 17:50:07 -0500 Subject: [PATCH] Updating to use of psutil directly Signed-off-by: jckand-amzn --- .../editor_python_test_tools/hydra_test_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py index 343eb5b12d..382a6f27f7 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py @@ -6,13 +6,13 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import logging import os -import tempfile +import psutil import ly_test_tools.log.log_monitor import ly_test_tools.environment.process_utils as process_utils import ly_test_tools.environment.waiter as waiter -from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole from ly_remote_console.remote_console_commands import send_command_and_expect_response as send_command_and_expect_response + logger = logging.getLogger(__name__) @@ -89,7 +89,7 @@ def launch_and_validate_results_launcher(launcher, level, remote_console_instanc :return: True if port is listening. """ port_listening = False - for conn in process_utils.psutil.net_connections(): + for conn in psutil.net_connections(): if 'port={}'.format(port) in str(conn): port_listening = True return port_listening