<commit_before># -*- coding: utf-8 -*-

import logging

import openerp.osv.orm # TODO use openerp.exceptions
import openerp.pooler
import openerp.release
import openerp.tools

import security

_logger = logging.getLogger(__name__)

RPC_VERSION_1 = {
        'server_version': openerp.release.version,
        'server_version_info': openerp.release.version_info,
        'server_serie': openerp.release.serie,
        'protocol_version': 1,
}

def dispatch(method, params):
    if method in ['login', 'about', 'timezone_get', 'get_server_environment',
                  'login_message','get_stats', 'check_connectivity',
                  'list_http_services', 'version', 'authenticate']:
        pass
    elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel', 'get_os_time', 'get_sqlcount']:
        passwd = params[0]
        params = params[1:]
        security.check_super(passwd)
    else:
        raise Exception("Method not found: %s" % method)
<commit_msg>[REF] common: the previously removed functions were still listed in dispatch().<commit_after># -*- coding: utf-8 -*-

import logging

import openerp.osv.orm # TODO use openerp.exceptions
import openerp.pooler
import openerp.release
import openerp.tools

import security

_logger = logging.getLogger(__name__)

RPC_VERSION_1 = {
        'server_version': openerp.release.version,
        'server_version_info': openerp.release.version_info,
        'server_serie': openerp.release.serie,
        'protocol_version': 1,
}

def dispatch(method, params):
    if method in ['login', 'about', 'timezone_get',
                  'login_message',
                  'version', 'authenticate']:
        pass
    elif method in ['set_loglevel']:
        passwd = params[0]
        params = params[1:]
        security.check_super(passwd)
    else:
        raise Exception("Method not found: %s" % method)

{'fraction_non_alphanumeric': 0.11683483802442911, 'fraction_numerical': 0.0053106744556558685, 'mean_word_length': 3.2337078651685394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4300768', 'n_tokens_mistral': 584, 'n_tokens_neox': 561, 'n_words': 133}