Patch2:
When getting description of a parameter from metadata, if the
description is blank and environment variable of LANG has been set to
"POSIX" , haclient will fall into an error.

Attached the patch.

Signed-off-by: Yan Gao <[EMAIL PROTECTED]>

-- 
Yan Gao
China R&D Software Engineer
[EMAIL PROTECTED]

Novell, Inc.
SUSEĀ® Linux Enterprise 10
Your Linux is ready
http://www.novell.com/linux
# HG changeset patch
# User Yan Gao <[EMAIL PROTECTED]>
# Date 1197451437 -28800
# Node ID ccd52a57e2950ddc5ef0ebc6691d873405b1cf46
# Parent  0d824123f5efa83c466ca3aebf6dbcc9c864041f
mgmt: Bugfix: Error caused by blank description of parameter

diff -r 0d824123f5ef -r ccd52a57e295 mgmt/client/haclient.py.in
--- a/mgmt/client/haclient.py.in	Tue Dec 11 22:18:38 2007 -0700
+++ b/mgmt/client/haclient.py.in	Wed Dec 12 17:23:57 2007 +0800
@@ -2587,13 +2587,14 @@ class Manager :
 				continue
 			if child.tagName != tag :
 				continue
+			if len(child.childNodes) == 0:
+				break
 			langtag = string.lower(child.getAttribute("lang"))
 			if langtag == "" :
 				desc_en = child.childNodes[0].data
 			else :
 				langtag = string.split(langtag, ".")
-				if string.find(langtag[0], "en") != -1 \
-						and len(child.childNodes) > 0 :
+				if string.find(langtag[0], "en") != -1 :
 					desc_en = child.childNodes[0].data
 				if len(langtag) == 1 and lang == langtag[0] :
 					desc_match = child.childNodes[0].data
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to