1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-21 17:29:59 -05:00

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 <rol@ndsommer.de>
This commit is contained in:
Roland Sommer 2023-12-21 13:36:27 +01:00
parent 199b26f1d5
commit 844c2e8187

View File

@ -60,7 +60,7 @@ vsphere_client = create_vsphere_client(server=args.server,
cert = args.cert.encode(encoding='utf-8').decode('unicode_escape') cert = args.cert.encode(encoding='utf-8').decode('unicode_escape')
if args.key is not None: 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: else:
key = args.key key = args.key