diff options
author | Vipin Balachandran <vbala@vmware.com> | 2019-05-13 15:56:25 -0700 |
---|---|---|
committer | Vipin Balachandran <vbala@vmware.com> | 2019-05-13 16:03:29 -0700 |
commit | 42d240a2eb200d93fd1a1d9962f4a747eb31985b (patch) | |
tree | a25fd62c2f7ee860a84ae074596faf7eb4bf0de9 /oslo_vmware/api.py | |
parent | 95d849ebe733c3748bdc293362d3a9a4b744b857 (diff) | |
download | oslo-vmware-42d240a2eb200d93fd1a1d9962f4a747eb31985b.tar.gz |
Set locale to english
oslo.vmware library does not need to emit localized messages from
vCenter. Explicitly setting the locale to 'en' during session
establishment to avoid UnicodeDecodeError while handling non-
english vCenter messages.
Change-Id: Ifb26a7832c15af3ed3227c94131fe0b22579e889
Diffstat (limited to 'oslo_vmware/api.py')
-rw-r--r-- | oslo_vmware/api.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oslo_vmware/api.py b/oslo_vmware/api.py index 76cbeba..81c44ef 100644 --- a/oslo_vmware/api.py +++ b/oslo_vmware/api.py @@ -243,7 +243,8 @@ class VMwareAPISession(object): LOG.debug("Logging into host: %s.", self._host) session = self.vim.Login(session_manager, userName=self._server_username, - password=self._server_password) + password=self._server_password, + locale='en') self._session_id = session.key # We need to save the username in the session since we may need it # later to check active session. The SessionIsActive method requires |