public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* The tag: cman_2_0_88 has been created
@ 2008-09-11 17:30 Chris Feist
  0 siblings, 0 replies; only message in thread
From: Chris Feist @ 2008-09-11 17:30 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5094d8152494f13a0bdfa21a2b7b0d781a7b964a
Commit:        5094d8152494f13a0bdfa21a2b7b0d781a7b964a
Parent:        32e9845dcb40afbd4e0e4fedb7f4c9441e530162
Author:        Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate:    Thu Sep 11 17:57:45 2008 +0200
Committer:     Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Thu Sep 11 18:03:15 2008 +0200

[FENCE] Fix #460054 - fence_apc fails with pexpect exception

In some special unspecified cases it is possible that
connection will be closed before we run close(). This is not
a problem because everything is checked before.
---
 fence/agents/apc/fence_apc.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index 65b9502..b8f0637 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -14,7 +14,7 @@
 ##        cipher (des/blowfish) have to be defined
 #####
 
-import sys, re, pexpect
+import sys, re, pexpect, exceptions
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
@@ -191,9 +191,16 @@ def main():
 
 	##
 	## Logout from system
+	##
+	## In some special unspecified cases it is possible that 
+	## connection will be closed before we run close(). This is not 
+	## a problem because everything is checked before.
 	######
-	conn.sendline("4")
-	conn.close()
+	try:
+		conn.sendline("4")
+		conn.close()
+	except exceptions.OSError:
+		pass
 
 if __name__ == "__main__":
 	main()


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

only message in thread, other threads:[~2008-09-11 17:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11 17:30 The tag: cman_2_0_88 has been created Chris Feist

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).