vcenter provider: avoid a TypeError exception
Avoid `TypeError: option values must be strings` with `ConfigParser`. Default values must be string, not `None`. The error happens when `test/integration/cloud-config-vcenter.ini` does not have the `vmware_proxy_host` or `vmware_proxy_port` keys defined.
This commit is contained in:
parent
b7868529ee
commit
e9b1e36d76
1 changed files with 2 additions and 2 deletions
|
@ -215,8 +215,8 @@ class VcenterProvider(CloudProvider):
|
|||
def _setup_static(self):
|
||||
parser = ConfigParser({
|
||||
'vcenter_port': '443',
|
||||
'vmware_proxy_host': None,
|
||||
'vmware_proxy_port': None})
|
||||
'vmware_proxy_host': '',
|
||||
'vmware_proxy_port': ''})
|
||||
parser.read(self.config_static_path)
|
||||
|
||||
self.endpoint = parser.get('DEFAULT', 'vcenter_hostname')
|
||||
|
|
Loading…
Add table
Reference in a new issue