From 38ab07ed517388541d59b49f7ceb4cb8b40eb9dd Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Wed, 18 Dec 2024 20:10:29 -0500 Subject: [PATCH] Fix psutil 'connections' deprecation warning When running the functional tests, calls to psutil.Process.connections() in class OvsdbServer.start() generates this: DeprecationWarning: connections() is deprecated and will be removed; use net_connections() instead Since we are already requiring psutil>=6.1.0 and net_connections() was introduced in 6.0.0, just update the call. TrivialFix Change-Id: If5f7dc74dc65aeb40b51a67f0fbe2b33f6ca3e7c --- neutron/tests/functional/resources/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/tests/functional/resources/process.py b/neutron/tests/functional/resources/process.py index 00216bcf4ab..ec5c5ad54b0 100644 --- a/neutron/tests/functional/resources/process.py +++ b/neutron/tests/functional/resources/process.py @@ -218,7 +218,7 @@ class OvsdbServer(DaemonProcessFixture): reraise=True) def get_ovsdb_remote_port_retry(pid): process = psutil.Process(pid) - for connect in process.connections(): + for connect in process.net_connections(): if connect.status == 'LISTEN': return connect.laddr[1] raise Exception(_("Could not find LISTEN port."))