Skip to content

Commit 844c2e8

Browse files
committed
Fix argument handling
The `key` part of the argument handling has to be right after `args`, otherwise you'd get an `AttributeError` when trying to call `encode` on the `args` object. Signed-off-by: Roland Sommer <[email protected]>
1 parent 199b26f commit 844c2e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/vsphere/vcenter/certificatemanagement/replace_tls_certificate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
cert = args.cert.encode(encoding='utf-8').decode('unicode_escape')
6161

6262
if args.key is not None:
63-
key = args.encode(encoding='utf-8').key.decode('unicode_escape')
63+
key = args.key.encode(encoding='utf-8').decode('unicode_escape')
6464
else:
6565
key = args.key
6666

0 commit comments

Comments
 (0)