Updating to use of psutil directly

Signed-off-by: jckand-amzn <jckand@amazon.com>
This commit is contained in:
jckand-amzn
2021-07-09 17:50:07 -05:00
parent 35a60cdf1a
commit ceae858f09
@@ -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