def executor(*argv, **kwargs):
            """Actual wrapper, that adds some new parameters to the decorated function 'f'"""
            if databaseConfig :
                if databaseConfig.has_connection_pool(pool_name) :
                    # calculate the argument name to be assigned
                    n = argument_name if argument_name is not None else pool_name
                    p = databaseConfig.get_connection_pool( pool_name )
                    if p :
                        kwargs[ n ] = p
                    else :
                        _logger.error( 'Pool named %s is not initialized', pool_name )
                else :
                    _logger.error( 'Pool named %s is not defined!', pool_name )
            else :
                _logger.error( 'Database configuration should be initialized with fileConfig(fileName) call.')
            f(*argv, **kwargs) #IGNORE:W0142
Actual wrapper, that adds some new parameters to the decorated function 'f'
recipes/Python/577072_Global_database_configuraticontext_aware/recipe-577072.py