def confirm(self, action_name): result = False prompt = "Are you sure you want to {}? Y/N".format(action_name) user_input = cv.get_input(prompt) try: if user_input[0].lower() == "y": result = True except IndexError: print(Err.get_error_message(102)) self.confirm(action_name) return result
def _get_command(self): user_command = cv.get_input(self.prompt) self._split_command(user_command)