diff --git a/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py b/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py index 881f4bd24..70a4ee086 100644 --- a/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py +++ b/samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py @@ -60,7 +60,7 @@ 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