[IMP]:ENvironment INFO
bzr revid: nch@tinyerp.com-20090714053117-2c3aoviemgv0zwae
This commit is contained in:
parent
846fca4017
commit
6926d61d73
|
@ -29,7 +29,7 @@ import thread
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
|
import platform
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import addons
|
import addons
|
||||||
import ir
|
import ir
|
||||||
|
@ -528,29 +528,23 @@ GNU Public Licence.
|
||||||
|
|
||||||
def get_server_environment(self):
|
def get_server_environment(self):
|
||||||
try:
|
try:
|
||||||
revno = os.popen('bzr revno').read()
|
rev_id = os.popen('bzr revision-info').read()
|
||||||
rev_log = ''
|
|
||||||
cnt = 0
|
|
||||||
for line in os.popen('bzr log -r %s'%(int(revno))).readlines():
|
|
||||||
if line.find(':')!=-1:
|
|
||||||
if not cnt == 4:
|
|
||||||
rev_log += '\t' + line
|
|
||||||
cnt += 1
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
rev_log = 'Exception: %s\n' % (str(e))
|
rev_id = 'Exception: %s\n' % (str(e))
|
||||||
|
|
||||||
os_lang = os.environ.get('LANG', '').split('.')[0]
|
os_lang = os.environ.get('LANG', '').split('.')[0]
|
||||||
environment = '\nEnvironment_Information : \n' \
|
environment = '\nEnvironment Information : \n' \
|
||||||
'PlatForm : %s\n' \
|
'PlatForm : %s\n' \
|
||||||
'Operating System : %s\n' \
|
'Operating System : %s\n' \
|
||||||
|
'Operating System Release : %s\n' \
|
||||||
'Operating System Version : %s\n' \
|
'Operating System Version : %s\n' \
|
||||||
|
'Operating System Architecture : %s\n' \
|
||||||
'Operating System Locale : %s\n'\
|
'Operating System Locale : %s\n'\
|
||||||
'Python Version : %s\n'\
|
'Python Version : %s\n'\
|
||||||
'OpenERP-Server Version : %s\n'\
|
'OpenERP-Server Version : %s\n'\
|
||||||
'Last revision Details: \n%s' \
|
'Last revision No. & ID : %s'\
|
||||||
%(sys.platform,os.name,str(sys.version.split('\n')[1]),os_lang,str(sys.version[0:5]),release.version,rev_log)
|
%(platform.platform(),os.name, platform.release(),platform.version(),
|
||||||
|
platform.architecture()[0],os_lang,platform.python_version(),release.version,rev_id)
|
||||||
return environment
|
return environment
|
||||||
common()
|
common()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue