From f2087d57f3ca135493aeb89f180b939b2a607f29 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 23 Sep 2009 14:42:19 +0530 Subject: [PATCH 1/5] [IMP]quality_integration_server: quality log : add new option to specify qualitylog path to store html pages of log bzr revid: hmo@tinyerp.com-20090923091219-owu6zi4jio20xt1f --- .../base_quality_interrogation.py | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index f4e84f5194a..3f3010350f3 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -101,8 +101,9 @@ def import_translate(uri, user, pwd, dbname, translate_in): state = res['state'] -def check_quality(uri, user, pwd, dbname, modules): +def check_quality(uri, user, pwd, dbname, modules, quality_logs): uid = login(uri, dbname, user, pwd) + quality_logs += 'quality-logs' if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') final = {} @@ -111,7 +112,7 @@ def check_quality(uri, user, pwd, dbname, modules): test_detail = {} quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' - html = '''''' + html = '''''' html +="

Module : %s

"%(quality_result['name']) html += "

Final score : %s

"%(quality_result['final_score']) html += "
" @@ -126,15 +127,21 @@ def check_quality(uri, user, pwd, dbname, modules): detail['detail'] = '''%s'''%(detail.get('summary','')) detail_html +="

%s (Score : %s)

%s
"%(test.replace(' ','-'),test,score,detail.get('detail','')) test_detail[test] = (score,msg,detail.get('detail','')) - html += "%s"%(detail_html) - html += "
" - final[quality_result['name']] = (quality_result['final_score'],html,test_detail) + html += "" + html += "%s"%(detail_html) + html += "" + if not os.path.isdir(quality_logs): + os.mkdir(quality_logs) + fp = open('%s/%s.html'%(quality_logs,module),'wb') + fp.write(str(html)) + fp.close() + #final[quality_result['name']] = (quality_result['final_score'],html,test_detail) - fp = open('quality_log.pck','wb') - pck_obj = pickle.dump(final,fp) - fp.close() - print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) - return final + #fp = open('quality_log.pck','wb') + #pck_obj = pickle.dump(final,fp) + #fp.close() + #print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) + return True else: print 'Login Failed...' clean() @@ -273,6 +280,7 @@ parser = optparse.OptionParser(usage) parser.add_option("--modules", dest="modules", help="specify modules to install or check quality") parser.add_option("--addons-path", dest="addons_path", help="specify the addons path") +parser.add_option("--quality-logs", dest="quality_logs", help="specify the path of quality logs files which has to stores") parser.add_option("--root-path", dest="root_path", help="specify the root path") parser.add_option("-p", "--port", dest="port", help="specify the TCP port", type="int") parser.add_option("-d", "--database", dest="db_name", help="specify the database name") @@ -303,6 +311,7 @@ die(opt.translate_in and (not opt.db_name), options = { 'addons-path' : opt.addons_path or 'addons', + 'quality-logs' : opt.quality_logs or '', 'root-path' : opt.root_path or '', 'translate-in': [], 'port' : opt.port or 8069, @@ -337,7 +346,7 @@ try: if command == 'upgrade-module': upgrade_module(uri, options['database'], options['modules'], options['login'], options['pwd']) if command == 'check-quality': - check_quality(uri, options['login'], options['pwd'], options['database'], options['modules']) + check_quality(uri, options['login'], options['pwd'], options['database'], options['modules'], options['quality-logs']) if command == 'install-translation': import_translate(uri, options['login'], options['pwd'], options['database'], options['translate-in']) clean() From 244de09ee563f0e72fa6330c71f316415bb690ad Mon Sep 17 00:00:00 2001 From: "uco(OpenERP)" <> Date: Thu, 24 Sep 2009 19:52:27 +0530 Subject: [PATCH 2/5] [FIX] Update Module : Float8 to float and numeric to float casting made possible lp bug: https://launchpad.net/bugs/433886 fixed bzr revid: jvo@tinyerp.com-20090924142227-qbx2y0a56r6d263n --- bin/osv/orm.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index cf215adf12e..812c5de3791 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1786,6 +1786,8 @@ class orm(orm_template): ('varchar', 'text', 'TEXT', ''), ('int4', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]), ('date', 'datetime', 'TIMESTAMP', '::TIMESTAMP'), + ('numeric', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]), + ('float8', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]), ] # !!! Avoid reduction of varchar field !!! if f_pg_type == 'varchar' and f._type == 'char' and f_pg_size < f.size: @@ -1798,13 +1800,15 @@ class orm(orm_template): cr.commit() for c in casts: if (f_pg_type==c[0]) and (f._type==c[1]): - logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1])) - ok = True - cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k)) - cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, c[2])) - cr.execute(('UPDATE "%s" SET "%s"=temp_change_size'+c[3]) % (self._table, k)) - cr.execute('ALTER TABLE "%s" DROP COLUMN temp_change_size CASCADE' % (self._table,)) - cr.commit() + if f_pg_type != f_obj_type: + logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1])) + ok = True + cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k)) + cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, c[2])) + cr.execute(('UPDATE "%s" SET "%s"=temp_change_size'+c[3]) % (self._table, k)) + cr.execute('ALTER TABLE "%s" DROP COLUMN temp_change_size CASCADE' % (self._table,)) + cr.commit() + break if f_pg_type != f_obj_type: if not ok: From 369755e92a0f235901f13d114171839b2a379100 Mon Sep 17 00:00:00 2001 From: nch-openerp <> Date: Fri, 25 Sep 2009 13:10:13 +0530 Subject: [PATCH 3/5] [FIX]quality_integration_server: ascci encoding problem in quality html log bzr revid: hmo@tinyerp.com-20090925074013-dsnxc54vo7t7payg --- .../base_quality_interrogation.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index 3f3010350f3..aae89368a8f 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -37,6 +37,18 @@ waittime = 10 wait_count = 0 wait_limit = 12 +def to_decode(s): + try: + return s.encode('utf-8') + except UnicodeError: + try: + return s.encode('latin') + except UnicodeError: + try: + return s.decode('ascii') + except UnicodeError: + return s + def start_server(root_path, port, addons_path): os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(root_path, str(port), addons_path)) def clean(): @@ -133,7 +145,7 @@ def check_quality(uri, user, pwd, dbname, modules, quality_logs): if not os.path.isdir(quality_logs): os.mkdir(quality_logs) fp = open('%s/%s.html'%(quality_logs,module),'wb') - fp.write(str(html)) + fp.write(to_decode(html)) fp.close() #final[quality_result['name']] = (quality_result['final_score'],html,test_detail) From a5d33505a8864949d73ad8200be86d5b291a4033 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Tue, 29 Sep 2009 18:09:23 +0530 Subject: [PATCH 4/5] [FIX] Export Translation : Warning on Non-existing record instead of breaking flow lp bug: https://launchpad.net/bugs/437729 fixed bzr revid: jvo@tinyerp.com-20090929123923-yw60232e0sgu5nbp --- bin/tools/translate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 51966b992bc..62f48aaa3c6 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -424,14 +424,14 @@ def trans_generate(lang, modules, dbname=None): xml_name = "%s.%s" % (module, encode(xml_name)) if not pool.get(model): - logger.notifyChannel("db", netsvc.LOG_ERROR, "unable to find object %r" % (model,)) + logger.notifyChannel("db", netsvc.LOG_ERROR, "Unable to find object %r" % (model,)) continue - try: - obj = pool.get(model).browse(cr, uid, res_id) - except BrowseRecordError: - logger.notifyChannel("db", netsvc.LOG_ERROR, "unable to find object %r with id %d" % (model, res_id)) + exists = pool.get(model).exists(cr, uid, res_id) + if not exists: + logger.notifyChannel("db", netsvc.LOG_WARNING, "Unable to find object %r with id %d" % (model, res_id)) continue + obj = pool.get(model).browse(cr, uid, res_id) if model=='ir.ui.view': d = xml.dom.minidom.parseString(encode(obj.arch)) From 92df67814c628cb475ebd5fd4921c4bed570f31b Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Wed, 30 Sep 2009 12:24:19 +0530 Subject: [PATCH 5/5] [IMP] base_quality_interrrogation: put message if the score of quality less then minimal and remove unit test condition bzr revid: mra@tinyerp.com-20090930065419-23hlpso95d35z810 --- .../base_quality_interrogation.py | 165 +++++++++--------- 1 file changed, 81 insertions(+), 84 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index aae89368a8f..ca9bbddc593 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -49,24 +49,24 @@ def to_decode(s): except UnicodeError: return s -def start_server(root_path, port, addons_path): - os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(root_path, str(port), addons_path)) +def start_server(root_path, port, addons_path): + os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(root_path, str(port), addons_path)) def clean(): if os.path.isfile('openerp.pid'): - ps = open('openerp.pid') + ps = open('openerp.pid') if ps: pid = int(ps.read()) - ps.close() - if pid: + ps.close() + if pid: os.kill(pid,9) def execute(connector, method, *args): - global wait_count + global wait_count res = False - try: + try: res = getattr(connector,method)(*args) - except socket.error,e: - if e.args[0] == 111: + except socket.error,e: + if e.args[0] == 111: if wait_count > wait_limit: print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit) clean() @@ -78,23 +78,23 @@ def execute(connector, method, *args): else: raise e wait_count = 0 - return res + return res def login(uri, dbname, user, pwd): conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/common') - uid = execute(conn,'login',dbname, user, pwd) + uid = execute(conn,'login',dbname, user, pwd) return uid -def import_translate(uri, user, pwd, dbname, translate_in): - uid = login(uri, dbname, user, pwd) - if uid: +def import_translate(uri, user, pwd, dbname, translate_in): + uid = login(uri, dbname, user, pwd) + if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') wiz_id = execute(conn,'create',dbname, uid, pwd, 'module.lang.import') for trans_in in translate_in: - lang,ext = os.path.splitext(trans_in.split('/')[-1]) - state = 'init' + lang,ext = os.path.splitext(trans_in.split('/')[-1]) + state = 'init' datas = {'form':{}} - while state!='end': + while state!='end': res = execute(conn,'execute',dbname, uid, pwd, wiz_id, datas, state, {}) if 'datas' in res: datas['form'].update( res['datas'].get('form',{}) ) @@ -110,34 +110,31 @@ def import_translate(uri, user, pwd, dbname, translate_in): }) trans_obj.close() elif res['type']=='action': - state = res['state'] - - -def check_quality(uri, user, pwd, dbname, modules, quality_logs): + state = res['state'] + + +def check_quality(uri, user, pwd, dbname, modules, quality_logs): uid = login(uri, dbname, user, pwd) quality_logs += 'quality-logs' if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') - final = {} - for module in modules: + final = {} + for module in modules: qualityresult = {} - test_detail = {} + test_detail = {} quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' html = '''''' - html +="

Module : %s

"%(quality_result['name']) - html += "

Final score : %s

"%(quality_result['final_score']) + html +="

Module: %s

"%(quality_result['name']) + html += "

Final score: %s

"%(quality_result['final_score']) html += "
" html += "
    " - for x,y,detail in quality_result['check_detail_ids']: + for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "
  • %s
  • "%(test.replace(' ','-'),test) - if test == 'Unit Test': - if not detail.get('detail',''): - detail['detail'] = '''%s'''%(detail.get('summary','')) - detail_html +="

    %s (Score : %s)

    %s
    "%(test.replace(' ','-'),test,score,detail.get('detail','')) + detail_html +='''

    %s (Score : %s)

    %s
    %s
    '''%(test.replace(' ', '-'), test, score, msg, detail.get('detail', '')) test_detail[test] = (score,msg,detail.get('detail','')) html += "
" html += "%s"%(detail_html) @@ -155,9 +152,9 @@ def check_quality(uri, user, pwd, dbname, modules, quality_logs): #print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) return True else: - print 'Login Failed...' + print 'Login Failed...' clean() - sys.exit(1) + sys.exit(1) @@ -176,25 +173,25 @@ def create_db(uri, dbname, user='admin', pwd='admin', lang='en_US'): login_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/common') db_list = execute(conn, 'list') if dbname not in db_list: - id = execute(conn,'create',admin_passwd, dbname, True, lang) + id = execute(conn,'create',admin_passwd, dbname, True, lang) wait(id,uri) - uid = login_conn.login(dbname, user, pwd) + uid = login_conn.login(dbname, user, pwd) wiz_id = execute(wiz_conn,'create', dbname, uid, user, 'base_setup.base_setup') state = 'init' datas = {'form':{}} - while state!='config': + while state!='config': res = execute(wiz_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) if state=='init': datas['form'].update( res['datas'] ) if res['type']=='form': - for field in res['fields'].keys(): + for field in res['fields'].keys(): datas['form'][field] = datas['form'].get(field,False) state = res['state'][-1][0] datas['form'].update({ - 'profile': -1 + 'profile': -1 }) elif res['type']=='state': state = res['state'] @@ -206,71 +203,71 @@ def drop_db(uri, dbname): conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/db') db_list = execute(conn,'list') if dbname in db_list: - execute(conn, 'drop', admin_passwd, dbname) + execute(conn, 'drop', admin_passwd, dbname) return True - + def make_links(uri, uid, dbname, source, destination, module, user, pwd): if module in ('base','quality_integration_server'): - return True - if not os.path.islink(destination + '/' + module): - if not os.path.isdir(destination + '/' + module): + return True + if not os.path.islink(destination + '/' + module): + if not os.path.isdir(destination + '/' + module): for path in source: if os.path.isdir(path + '/' + module): os.symlink(path + '/' + module, destination + '/' + module) obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list') module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)]) - if len(module_ids): + if len(module_ids): data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id']) dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name']) - for dep_data in dep_datas: + for dep_data in dep_datas: make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd) - return True - return False + return True + return False def install_module(uri, dbname, modules, addons='', extra_addons='', user='admin', pwd='admin'): uid = login(uri, dbname, user, pwd) if extra_addons: extra_addons = extra_addons.split(',') - if uid: + if uid: if addons and extra_addons: - for module in modules: - make_links(uri, uid, dbname, extra_addons, addons, module, user, pwd) + for module in modules: + make_links(uri, uid, dbname, extra_addons, addons, module, user, pwd) obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') wizard_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','in',modules)]) - execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'button_install', module_ids) + execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'button_install', module_ids) wiz_id = execute(wizard_conn, 'create', dbname, uid, pwd, 'module.upgrade.simple') state = 'init' datas = {} #while state!='menu': - while state!='end': - res = execute(wizard_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) + while state!='end': + res = execute(wizard_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) if state == 'init': state = 'start' elif state == 'start': - state = 'end' + state = 'end' return True def upgrade_module(uri, dbname, modules, user='admin', pwd='admin'): uid = login(uri, dbname, user, pwd) - if uid: + if uid: obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') - wizard_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') - module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','in',modules)]) - execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'button_upgrade', module_ids) + wizard_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') + module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','in',modules)]) + execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'button_upgrade', module_ids) wiz_id = execute(wizard_conn, 'create', dbname, uid, pwd, 'module.upgrade.simple') state = 'init' datas = {} #while state!='menu': - while state!='end': - res = execute(wizard_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) + while state!='end': + res = execute(wizard_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) if state == 'init': state = 'start' elif state == 'start': - state = 'end' - + state = 'end' + return True @@ -283,21 +280,21 @@ Basic Commands: start-server Start Server create-db Create new database drop-db Drop database - install-module Install module + install-module Install module upgrade-module Upgrade module install-translation Install translation file check-quality Calculate quality and dump quality result into quality_log.pck using pickle """ -parser = optparse.OptionParser(usage) +parser = optparse.OptionParser(usage) parser.add_option("--modules", dest="modules", help="specify modules to install or check quality") parser.add_option("--addons-path", dest="addons_path", help="specify the addons path") parser.add_option("--quality-logs", dest="quality_logs", help="specify the path of quality logs files which has to stores") parser.add_option("--root-path", dest="root_path", help="specify the root path") parser.add_option("-p", "--port", dest="port", help="specify the TCP port", type="int") -parser.add_option("-d", "--database", dest="db_name", help="specify the database name") -parser.add_option("--login", dest="login", help="specify the User Login") -parser.add_option("--password", dest="pwd", help="specify the User Password") +parser.add_option("-d", "--database", dest="db_name", help="specify the database name") +parser.add_option("--login", dest="login", help="specify the User Login") +parser.add_option("--password", dest="pwd", help="specify the User Password") parser.add_option("--translate-in", dest="translate_in", help="specify .po files to import translation terms") parser.add_option("--extra-addons", dest="extra_addons", @@ -308,7 +305,7 @@ if len(args) != 1: parser.error("incorrect number of arguments") command = args[0] if command not in ('start-server','create-db','drop-db','install-module','upgrade-module','check-quality','install-translation'): - parser.error("incorrect command") + parser.error("incorrect command") def die(cond, msg): if cond: @@ -326,7 +323,7 @@ options = { 'quality-logs' : opt.quality_logs or '', 'root-path' : opt.root_path or '', 'translate-in': [], - 'port' : opt.port or 8069, + 'port' : opt.port or 8069, 'database': opt.db_name or 'terp', 'modules' : opt.modules or [], 'login' : opt.login or 'admin', @@ -337,33 +334,33 @@ options = { options['modules'] = opt.modules and map(lambda m: m.strip(), opt.modules.split(',')) or [] # Hint:i18n-import=purchase:ar_AR.po+sale:fr_FR.po,nl_BE.po if opt.translate_in: - translate = opt.translate_in - for module_name,po_files in map(lambda x:tuple(x.split(':')),translate.split('+')): - for po_file in po_files.split(','): + translate = opt.translate_in + for module_name,po_files in map(lambda x:tuple(x.split(':')),translate.split('+')): + for po_file in po_files.split(','): po_link = '%s/%s/i18n/%s'%(options['addons-path'], module_name, po_file) - options['translate-in'].append(po_link) - + options['translate-in'].append(po_link) + uri = 'http://localhost:' + str(options['port']) server_thread = threading.Thread(target=start_server, args=(options['root-path'], options['port'], options['addons-path'])) -try: - server_thread.start() - if command == 'create-db': +try: + server_thread.start() + if command == 'create-db': create_db(uri, options['database'], options['login'], options['pwd']) - if command == 'drop-db': + if command == 'drop-db': drop_db(uri, options['database']) - if command == 'install-module': + if command == 'install-module': install_module(uri, options['database'], options['modules'],options['addons-path'],options['extra-addons'],options['login'], options['pwd']) - if command == 'upgrade-module': + if command == 'upgrade-module': upgrade_module(uri, options['database'], options['modules'], options['login'], options['pwd']) if command == 'check-quality': check_quality(uri, options['login'], options['pwd'], options['database'], options['modules'], options['quality-logs']) - if command == 'install-translation': + if command == 'install-translation': import_translate(uri, options['login'], options['pwd'], options['database'], options['translate-in']) clean() sys.exit(0) - + except xmlrpclib.Fault, e: print e.faultString clean() @@ -372,7 +369,7 @@ except Exception, e: print e clean() sys.exit(1) - +