This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

The tag: gfs2_0_1_45 has been created


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]