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
def get_type(choice): element_type = base_manager.get_type(choice) return element_type
def get_constants(element): element_type = base_manager.get_type(element) constants = managers_factory.get_constants(element_type) return constants
def get_manager(element): element_type = base_manager.get_type(element) manager = managers_factory.get_manager(element_type) return manager
def get_type(menu): element_type = base_manager.get_type(menu) return element_type