This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
master - [FENCE] Fix #290231 - "Switch (optional)" param does notdefault to "1" and program fails
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 26 Sep 2008 08:37:56 +0000 (UTC)
- Subject: master - [FENCE] Fix #290231 - "Switch (optional)" param does notdefault to "1" and program fails
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1f7b30389640dd45b122de1c7f460c7e6fdf24e5
Commit: 1f7b30389640dd45b122de1c7f460c7e6fdf24e5
Parent: 20b4a54a7518aff0132c0692c4a2a15c7dd99109
Author: Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate: Wed Sep 24 16:46:35 2008 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri Sep 26 10:37:40 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