fence-agents: master - fence_vmnware_soap: Fix traceback when hostname cannot be resolved to IP address
Marek GrĂ¡c
marx at fedoraproject.org
Wed Feb 6 13:07:26 UTC 2013
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=2d159cc3e800426d34c40f9fb53ea17e1b8d1ec7
Commit: 2d159cc3e800426d34c40f9fb53ea17e1b8d1ec7
Parent: 110e74e711d1a341d4f40dc3f253170bd6cb7651
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Wed Feb 6 14:06:53 2013 +0100
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed Feb 6 14:06:53 2013 +0100
fence_vmnware_soap: Fix traceback when hostname cannot be resolved to IP address
Resolves: rhbz#902404
---
fence/agents/vmware_soap/fence_vmware_soap.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 16ce5b2..b949dab 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -23,13 +23,13 @@ def soap_login(options):
conn = Client(url + "/vimService.wsdl")
conn.set_options(location = url)
- mo_ServiceInstance = Property('ServiceInstance')
- mo_ServiceInstance._type = 'ServiceInstance'
- ServiceContent = conn.service.RetrieveServiceContent(mo_ServiceInstance)
- mo_SessionManager = Property(ServiceContent.sessionManager.value)
- mo_SessionManager._type = 'SessionManager'
-
try:
+ mo_ServiceInstance = Property('ServiceInstance')
+ mo_ServiceInstance._type = 'ServiceInstance'
+ ServiceContent = conn.service.RetrieveServiceContent(mo_ServiceInstance)
+ mo_SessionManager = Property(ServiceContent.sessionManager.value)
+ mo_SessionManager._type = 'SessionManager'
+
SessionManager = conn.service.Login(mo_SessionManager, options["--username"], options["--password"])
except Exception, ex:
fail(EC_LOGIN_DENIED)
More information about the cluster-commits
mailing list