public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Marek Grác" <marx@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE2 - fencing: fence agents fails with pexpect exception
Date: Thu, 23 Jul 2009 10:16:00 -0000	[thread overview]
Message-ID: <20090723101610.89E48120337@lists.fedorahosted.org> (raw)

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 *
 


                 reply	other threads:[~2009-07-23 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090723101610.89E48120337@lists.fedorahosted.org \
    --to=marx@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).