Commit adb9ceb7 authored by Andreas Jung's avatar Andreas Jung

version and platform are now taken from the Pythons sys module.

This makes FreeBSD people happy because they will never complain again
that their Zope system claims to be a Linux system.
parent 89e731b0
......@@ -83,10 +83,17 @@
#
##############################################################################
import os
import os,sys,string,re
v=sys.version_info
def version_txt():
try: return open(os.path.join(SOFTWARE_HOME,'version.txt')).read()
except: return '(unreleased version)'
try:
s = open(os.path.join(SOFTWARE_HOME,'version.txt')).read()
s = re.sub("\(.*?)\?","",s)
s= '(%s, python %d.%d.%d, %s)' % (s,v[0],v[1],v[2],sys.platform)
return s
except:
return '(unreleased version, python %d.%d.%d, %s)' % (v[0],v[1],v[2],sys.platform)
return self._v_version_txt
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