cluster: STABLE3 - fencing: Version information not shown

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


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=82fff3bae8f627470cea7e04c2fbe1f93620937e
Commit:        82fff3bae8f627470cea7e04c2fbe1f93620937e
Parent:        bcac91aadf00a7c1c1d5855f2f3380943467041d
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Sun Dec 20 17:34:16 2009 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Sun Dec 20 17:34:16 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/lib/fencing.py.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 8c702b8..70bdd34 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