Commit 85ea5884 authored by Jens Vagelpohl's avatar Jens Vagelpohl

- consult other version.txt variations for version information for product

parent 59d8d375
......@@ -57,6 +57,10 @@ Zope Changes
Bugs Fixed
- Product initialization would only consult a file named "version.txt"
to read version information. Now it will check version.txt, VERSION.txt
and VERSION.TXT.
- Collector #928: DateIndex ignored timezones when indexing and
querying
......
......@@ -489,12 +489,22 @@ class Distribution:
def initializeProduct(productp, name, home, app):
# Initialize a levered product
products=app.Control_Panel.Products
fver = ''
if hasattr(productp, '__import_error__'): ie=productp.__import_error__
else: ie=None
try: fver=open(home+'/version.txt').read().strip()
except: fver=''
# Retrieve version number from any suitable version.txt
for fname in ('version.txt', 'VERSION.txt', 'VERSION.TXT'):
try:
fpath = os.path.join(home, fname)
fhandle = open(fpath, 'r')
fver = fhandle.read().strip()
fhandle.close()
break
except IOError:
continue
old=None
try:
if ihasattr(products,name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment