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
This commit is contained in:
parent
559672f777
commit
38ab07ed51
@ -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."))
|
||||
|
Loading…
Reference in New Issue
Block a user