From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9808 invoked by alias); 26 Sep 2008 08:39:43 -0000 Received: (qmail 9802 invoked by alias); 26 Sep 2008 08:39:43 -0000 X-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_210,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: STABLE2 - [FENCE] Fix #290231 - "Switch (optional)" param does not default to "1" and program fails To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE2 X-Git-Reftype: branch X-Git-Oldrev: fedd56b97fdc9b9bb2fa47958d14b9a324c4df3b X-Git-Newrev: 897627c5e22ba9f78a22cd213d02acb1fa7b68f4 From: "Fabio M. Di Nitto" Message-Id: <20080926083841.1A88E120444@lists.fedorahosted.org> Date: Fri, 26 Sep 2008 14:50:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00538.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=897627c5e22ba9f78a22cd213d02acb1fa7b68f4 Commit: 897627c5e22ba9f78a22cd213d02acb1fa7b68f4 Parent: fedd56b97fdc9b9bb2fa47958d14b9a324c4df3b Author: Marek 'marx' Grac AuthorDate: Wed Sep 24 16:46:35 2008 +0200 Committer: Fabio M. Di Nitto CommitterDate: Fri Sep 26 10:38:18 2008 +0200 [FENCE] Fix #290231 - "Switch (optional)" param does not default to "1" and program fails Bug itself was almost corrected in new fence agent but unfortunately '1' was entered as number not as string. Python can not do int + string and agent fails. --- fence/agents/apc/fence_apc.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index b8f0637..5d132be 100644 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -41,7 +41,7 @@ def get_power_status(conn, options): fail_usage("Failed: You have to enter physical switch number") else: if (0 == options.has_key("-s")): - options["-s"] = 1 + options["-s"] = "1" if (None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before)): version = 2