Skip to content

Commit 86cbf19

Browse files
committedMay 23, 2021
wsgi server: fix python 2.7/3.4 compatibility
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
1 parent e1711f2 commit 86cbf19

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎prometheus_client/exposition.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,9 @@ class ThreadingWSGIServer(ThreadingMixIn, WSGIServer):
143143
daemon_threads = True
144144

145145

146-
def _get_best_family(*address):
146+
def _get_best_family(address, port):
147147
infos = socket.getaddrinfo(
148-
*address,
149-
type=socket.SOCK_STREAM,
150-
flags=socket.AI_PASSIVE,
148+
address, port, 0, socket.SOCK_STREAM,
151149
)
152150
family, type, proto, canonname, sockaddr = next(iter(infos))
153151
return family, sockaddr[0]

0 commit comments

Comments
 (0)