python3: fix reraise
Related to six bug https://bitbucket.org/gutworth/six/issue/86/sixreraise-exception_object-none-traceback closes: https://github.com/vmware/pyvmomi/issues/92
This commit is contained in:
@@ -315,7 +315,8 @@ def __Login(host, port, user, pwd, service, adapter, version, path,
|
||||
# why the connection failed beyond the message string.
|
||||
(type, value, traceback) = sys.exc_info()
|
||||
if traceback:
|
||||
reraise(vim.fault.HostConnectFault(msg=str(e)), None, traceback)
|
||||
fault = vim.fault.HostConnectFault(msg=str(e))
|
||||
reraise(vim.fault.HostConnectFault, fault, traceback)
|
||||
else:
|
||||
raise vim.fault.HostConnectFault(msg=str(e))
|
||||
|
||||
|
Reference in New Issue
Block a user