Example #1
0
def add_choices(choice_list, choices):
    try:
        choice = dict_utils.get_value(choices,0)
        base_manager.get_type(choice)
        for choice in choices:
            choice_list.append(choice)

    except gen_exception.MissingValueError:
        choice_list.append(choices)
    except IndexError as error:
        method_name = 'add_choices'
        log_text = 'exception[{}]'.format(
            str(error)
        )
        log_utils.debug(log_text, method_name, __name__)

    return choice_list
Example #2
0
def get_type(choice):
    element_type = base_manager.get_type(choice)
    return element_type
Example #3
0
def get_constants(element):
    element_type = base_manager.get_type(element)
    constants = managers_factory.get_constants(element_type)
    return constants
Example #4
0
def get_manager(element):
    element_type = base_manager.get_type(element)
    manager = managers_factory.get_manager(element_type)
    return manager
Example #5
0
def get_type(menu):
    element_type = base_manager.get_type(menu)
    return element_type