From d045ae2957737e9f9997e5884b9e0c9cc77afc62 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 11 Oct 2023 15:17:10 +0200 Subject: [PATCH] cli: normalize hostname in error message Normalize the hostname printed for connection errors when pinging the server, in case anything was passed via --serverurl, --insecure, or --baseurl. --- src/subscription_manager/cli_command/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subscription_manager/cli_command/cli.py b/src/subscription_manager/cli_command/cli.py index 43916e1c63..5b65ac29c8 100644 --- a/src/subscription_manager/cli_command/cli.py +++ b/src/subscription_manager/cli_command/cli.py @@ -386,7 +386,7 @@ def main(self, args: Optional[List[str]] = None) -> Optional[int]: system_exit( os.EX_UNAVAILABLE, _("Unable to reach the server at {host}:{port}{handler}").format( - host=self.no_auth_cp.host, + host=connection.normalized_host(self.no_auth_cp.host), port=self.no_auth_cp.ssl_port, handler=self.no_auth_cp.handler, ),