vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.2k stars 766 forks source link

pyVim.connect module can raise exception of type Exception #453

Open solashR opened 7 years ago

solashR commented 7 years ago

because it raise exceptions of type Exception these exceptions can't be caught in a same manner - can catch other things as well for example:

if supportedVersion is None:
    raise Exception("%s:%s is not a VIM server" % (host, port)
jasper9 commented 6 years ago

it appears this exception is thrown also while the vCenter is being configured and services installing / starting up (if it was just deployed). this makes it difficult to accurately trap that case and keep trying to connect.