Commit 67d8df0e by James Cammarata

During vsphere config check attempt cast before marking values missing

Fixes #7385
parent 7faecd54
......@@ -974,7 +974,15 @@ class DefaultVMConfig(object):
for k, v in value.items():
if k in self.check_dict[key]:
if not isinstance(self.check_dict[key][k], v):
self.recursive_missing.append((k, v))
try:
if v == int:
self.check_dict[key][k] = int(self.check_dict[key][k])
elif v == basestring:
self.check_dict[key][k] = str(self.check_dict[key][k])
else:
raise ValueError
except ValueError:
self.recursive_missing.append((k, v))
else:
self.recursive_missing.append((k, v))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment