public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE2 - fencing: fence agents fails with pexpect exception
@ 2009-07-23 10:16 Marek Grác
  0 siblings, 0 replies; only message in thread
From: Marek Grác @ 2009-07-23 10:16 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=06cf4e24b7100ab26447c81e10eb755f3959a0ac
Commit:        06cf4e24b7100ab26447c81e10eb755f3959a0ac
Parent:        a626347b4cc50e69b519d948cec03a4f47c94047
Author:        Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate:    Thu Jul 23 12:14:25 2009 +0200
Committer:     Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Thu Jul 23 12:14:25 2009 +0200

fencing: fence agents fails with pexpect exception

bz#501586 - 2nd patch
---
 fence/agents/bladecenter/fence_bladecenter.py |    2 +-
 fence/agents/drac/fence_drac5.py              |    2 +-
 fence/agents/lpar/fence_lpar.py               |    2 +-
 fence/agents/rsa/fence_rsa.py                 |    2 +-
 fence/agents/virsh/fence_virsh.py             |    2 +-
 fence/agents/vmware/fence_vmware.py           |   11 ++++++++---
 fence/agents/wti/fence_wti.py                 |    2 +-
 7 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/fence/agents/bladecenter/fence_bladecenter.py b/fence/agents/bladecenter/fence_bladecenter.py
index dc5d091..e391bd2 100644
--- a/fence/agents/bladecenter/fence_bladecenter.py
+++ b/fence/agents/bladecenter/fence_bladecenter.py
@@ -12,7 +12,7 @@
 ##
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/drac/fence_drac5.py b/fence/agents/drac/fence_drac5.py
index 85bf3b5..f9c7044 100644
--- a/fence/agents/drac/fence_drac5.py
+++ b/fence/agents/drac/fence_drac5.py
@@ -12,7 +12,7 @@
 ## @note: drac_version was removed
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 1990f42..36a322b 100755
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -10,7 +10,7 @@
 ##
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 1e6314a..af62d03 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -7,7 +7,7 @@
 ##
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 3012621..c02336a 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -5,7 +5,7 @@
 # Virsh 0.3.3 on RHEL 5.2 with xen-3.0.3-51
 #
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py
index 887b3bb..2c7e824 100755
--- a/fence/agents/vmware/fence_vmware.py
+++ b/fence/agents/vmware/fence_vmware.py
@@ -6,7 +6,7 @@
 ## 
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
@@ -103,8 +103,13 @@ def main():
 	##
 	## Logout from system
 	######
-	conn.sendline("logout")
-	conn.close()
+	try:
+		conn.sendline("logout")
+		conn.close()
+	except exceptions.OSError:
+		pass
+	except pexpect.ExceptionPexpect:
+		pass
 
 if __name__ == "__main__":
 	main()
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index 814f27a..381e16c 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -11,7 +11,7 @@
 ##  WTI IPS-800-CE     v1.40h		(no username)
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-23 10:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 10:16 cluster: STABLE2 - fencing: fence agents fails with pexpect exception Marek Grác

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).