fence-agents: master - fencing: Version information not shown

Marek Grác marx at fedoraproject.org
Sun Dec 20 16:27:20 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=611802d969a10bc442b877ea3e759e03b0760aaf
Commit:        611802d969a10bc442b877ea3e759e03b0760aaf
Parent:        3a47f5c32fe9c428aa87b85943c33ed58a30fff9
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Sun Dec 20 17:24:36 2009 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Sun Dec 20 17:24:36 2009 +0100

fencing: Version information not shown

Option '-V' (get version info) is not working because attributes where
not properly named, so they result in empty strings.
---
 fence/agents/ilo_mp/fence_ilo_mp.py |    2 +-
 fence/agents/lib/fencing.py.py      |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fence/agents/ilo_mp/fence_ilo_mp.py b/fence/agents/ilo_mp/fence_ilo_mp.py
index 2ddd733..3aac36d 100644
--- a/fence/agents/ilo_mp/fence_ilo_mp.py
+++ b/fence/agents/ilo_mp/fence_ilo_mp.py
@@ -5,7 +5,7 @@ sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
 #BEGIN_VERSION_GENERATION
-FENCE_RELEASE_NAME=""
+RELEASE_VERSION=""
 REDHAT_COPYRIGHT=""
 BUILD_DATE=""
 #END_VERSION_GENERATION
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index d37498f..c4556d5 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -4,6 +4,7 @@ import sys, getopt, time, os
 import pexpect, re
 import telnetlib
 import atexit
+import __main__
 
 ## do not add code here.
 #BEGIN_VERSION_GENERATION
@@ -693,8 +694,8 @@ def show_docs(options, docs = None):
 		sys.exit(0)
 
 	if options.has_key("-V"):
-		print RELEASE_VERSION, BUILD_DATE
-		print REDHAT_COPYRIGHT
+		print __main__.RELEASE_VERSION, __main__.BUILD_DATE
+		print __main__.REDHAT_COPYRIGHT
 		sys.exit(0)
 
 def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None):


More information about the cluster-commits mailing list