From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 24 Jul 2007 15:00:30 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions FenceHandler.py Message-ID: <20070724150030.2752.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Branch: RHEL5 Changes by: rmccabe at sourceware.org 2007-07-24 15:00:30 Modified files: luci/site/luci/Extensions: FenceHandler.py Log message: Fix 249097 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.6&r2=1.4.2.7 --- conga/luci/site/luci/Extensions/FenceHandler.py 2007/06/18 18:39:32 1.4.2.6 +++ conga/luci/site/luci/Extensions/FenceHandler.py 2007/07/24 15:00:30 1.4.2.7 @@ -759,7 +759,11 @@ try: pwd = form['passwd'].strip() if not pwd: - raise Exception, 'blank' + if form['passwd']: + # allow passwords consisting of nothing but whitespace + fencedev.addAttribute('passwd', form['passwd']) + else: + raise Exception, 'blank' fencedev.addAttribute('passwd', pwd) has_passwd = True except Exception, e: @@ -1136,6 +1140,11 @@ fenceinst = Device() fenceinst.addAttribute('name', parent_name) + if form.has_key('option'): + option = form['option'].strip() + if option: + fenceinst.addAttribute('option', option) + try: ret = FI_VALIDATE[fence_agent](form, fenceinst) if len(ret) > 0: