diff --git a/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py b/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py index 881f4bd2..70a4ee08 100644 --- a/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py +++ b/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py @@ -60,7 +60,7 @@ vsphere_client = create_vsphere_client(server=args.server, cert = args.cert.encode(encoding='utf-8').decode('unicode_escape') if args.key is not None: - key = args.encode(encoding='utf-8').key.decode('unicode_escape') + key = args.key.encode(encoding='utf-8').decode('unicode_escape') else: key = args.key