From 457da4d897e4404ade489fdf15e50a1235807c94 Mon Sep 17 00:00:00 2001 From: John Rouillard Date: Wed, 1 Jan 2025 00:27:52 -0500 Subject: [PATCH] test: make probe_ports a class method under python2. --- test/wsgi_liveserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/wsgi_liveserver.py b/test/wsgi_liveserver.py index 93e9060a..a84ba5a1 100644 --- a/test/wsgi_liveserver.py +++ b/test/wsgi_liveserver.py @@ -84,7 +84,8 @@ def _post_teardown(self): self._thread.join() del self._server - def probe_ports(start=port_range[0], end=port_range[1]): + @classmethod + def probe_ports(cls, start=port_range[0], end=port_range[1]): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) port = start