In nova/utils.py, a func use the "type" method to determine the type. It's bertter to use the "isinstance" method instead.
The code is:
def convert_version_to_int(version):
try:
if type(version) == str:
version = convert_version_to_tuple(version)
if type(version) == tuple:
return reduce(lambda x, y: (x * 1000) + y, version)
except Exception:
raise exception.NovaException(message="Hypervisor version invalid.")
In nova/utils.py, a func use the "type" method to determine the type. It's bertter to use the "isinstance" method instead. version_ to_int( version) : version_ to_tuple( version) NovaException( message= "Hypervisor version invalid.")
The code is:
def convert_
try:
if type(version) == str:
version = convert_
if type(version) == tuple:
return reduce(lambda x, y: (x * 1000) + y, version)
except Exception:
raise exception.
.