test/cloud-meta-mock: do not print what we listen on if we got a FD

This message is useless for non-interactive use and clobbers over
otherwise very appealing test output.

The callers knows what we're going to listen on, it passed us the file
descriptor.
This commit is contained in:
Lubomir Rintel
2024-12-13 15:11:43 +01:00
parent 98f8224376
commit f7c8597835

View File

@@ -276,7 +276,10 @@ httpd = SocketHTTPServer(
allow_default=allow_default,
)
print("Listening on http://%s:%d" % (httpd.server_address[0], httpd.server_address[1]))
if fileno is None:
print(
"Listening on http://%s:%d" % (httpd.server_address[0], httpd.server_address[1])
)
httpd.server_activate()
httpd.serve_forever()