On Tue, Mar 19, 2024 at 04:32:49PM +0100, Max Carrara wrote: > +@contextmanager > +def connect_to_esxi_host(args: EsxiConnectonArgs) -> vim.ServiceInstance: > + """Opens a connection to an ESXi host with the given username and > password > + contained in the password file. > + """ > + ssl_context = ( > + ssl._create_unverified_context() > + if args.skip_cert_verification > + else None > + ) > + > + with open(args.password_file) as pw_file: > + password = pw_file.read().strip()
This strips all whitespace from both sides, which is not what we want. (Not that I particularly care whether esxi even allows spaces in passwords at all...) The old code specifically only stripped a single trailing *newline*, mainly for when you edit the file with eg. vim which defaults to adding one... _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel