From 6926d61d73eac0890cb761dd6c374b05483b4465 Mon Sep 17 00:00:00 2001 From: Naresh Choksy Date: Tue, 14 Jul 2009 11:01:17 +0530 Subject: [PATCH] [IMP]:ENvironment INFO bzr revid: nch@tinyerp.com-20090714053117-2c3aoviemgv0zwae --- bin/service/web_services.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index d21297baad2..399a62b14e4 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -29,7 +29,7 @@ import thread import threading import time import sys - +import platform from tools.translate import _ import addons import ir @@ -528,29 +528,23 @@ GNU Public Licence. def get_server_environment(self): try: - revno = os.popen('bzr revno').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 + rev_id = os.popen('bzr revision-info').read() 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] - environment = '\nEnvironment_Information : \n' \ + environment = '\nEnvironment Information : \n' \ 'PlatForm : %s\n' \ 'Operating System : %s\n' \ + 'Operating System Release : %s\n' \ 'Operating System Version : %s\n' \ + 'Operating System Architecture : %s\n' \ 'Operating System Locale : %s\n'\ 'Python Version : %s\n'\ 'OpenERP-Server Version : %s\n'\ - 'Last revision Details: \n%s' \ - %(sys.platform,os.name,str(sys.version.split('\n')[1]),os_lang,str(sys.version[0:5]),release.version,rev_log) + 'Last revision No. & ID : %s'\ + %(platform.platform(),os.name, platform.release(),platform.version(), + platform.architecture()[0],os_lang,platform.python_version(),release.version,rev_id) return environment common()