def _file_prompt_quiet(f):
@functools.wraps(f)<EOL>def wrapper(self, *args, **kwargs):<EOL><INDENT>if not self.prompt_quiet_configured:<EOL><INDENT>if self.auto_file_prompt:<EOL><INDENT>self.device.send_config_set(["<STR_LIT>"])<EOL>self.prompt_quiet_changed = True<EOL>self.prompt_quiet_configured = True<EOL><DEDENT>else:<EOL><INDENT>cmd = "<STR_LIT>"<EOL>show_cmd = "<STR_LIT>".format(cmd)<EOL>output = self.device.send_command_expect(show_cmd)<EOL>if cmd in output:<EOL><INDENT>self.prompt_quiet_configured = True<EOL><DEDENT>else:<EOL><INDENT>msg = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL>raise CommandErrorException(msg)<EOL><DEDENT><DEDENT><DEDENT>return f(self, *args, **kwargs)<EOL><DEDENT>return wrapper<EOL>
Decorator to toggle 'file prompt quiet' for methods that perform file operations.