[Erp5-report] r32378 rafael - /erp5/trunk/products/ERP5/Tool/IntrospectionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 9 19:47:47 CET 2010
Author: rafael
Date: Tue Feb 9 19:47:47 2010
New Revision: 32378
URL: http://svn.erp5.org?rev=32378&view=rev
Log:
Get zope version from App.version_txt instead search for a file. Tiny modification for get erp5 version.
Modified:
erp5/trunk/products/ERP5/Tool/IntrospectionTool.py
Modified: erp5/trunk/products/ERP5/Tool/IntrospectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/IntrospectionTool.py?rev=32378&r1=32377&r2=32378&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/IntrospectionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/IntrospectionTool.py [utf8] Tue Feb 9 19:47:47 2010
@@ -426,8 +426,14 @@
return '.'.join([str(i) for i in t])
from Products import ERP5 as erp5_product
erp5_product_path = erp5_product.__file__.split("/")[:-1]
- erp5_version = open("/".join((erp5_product_path) + ["VERSION.txt"])).read().strip()
- zope_version = open(getConfiguration().softwarehome + "/version.txt").read().strip()
+ try:
+ erp5_v = open("/".join((erp5_product_path) + ["VERSION.txt"])).read().strip()
+ erp5_version = erp5_v.replace("ERP5 ", "")
+ except:
+ erp5_version = None
+
+ from App import version_txt
+ zope_version = tuple_to_format_str(version_txt.getZopeVersion()[:2])
from sys import version_info
# Get only x.x.x numbers.
@@ -439,11 +445,8 @@
except:
pysvn_version = None
- return {
- "python" : py_version ,
- "pysvn" : pysvn_version ,
- "erp5" : erp5_version.replace("ERP5 ", ""),
- "zope" : zope_version.replace("Zope ", "")
+ return { "python" : py_version , "pysvn" : pysvn_version ,
+ "erp5" : erp5_version, "zope" : zope_version
}
InitializeClass(IntrospectionTool)
More information about the Erp5-report
mailing list