trepan/interfaces/server.py
def confirm(self, prompt, default):
        """ Called when a dangerous action is about to be done to make sure
        it's okay. `prompt' is printed; user response is returned."""
        while True:
            try:
                self.write_confirm(prompt, default)
                reply = self.readline('').strip().lower()
            except EOFError:
                return default
            if reply in ('y', 'yes'):
                return True
            elif reply in ('n', 'no'):
                return False
            else:
                self.msg("Please answer y or n.")
                pass
            pass
        return default
def confirm(self, prompt, default):
        while True:
            try:
                self.write_confirm(prompt, default)
                reply = self.readline('').strip().lower()
            except EOFError:
                return default
            if reply in ('y', 'yes'):
                return True
            elif reply in ('n', 'no'):
                return False
            else:
                self.msg("Please answer y or n.")
                pass
            pass
        return default
def confirm ( self , prompt , default ) : while True : try : self . write_confirm ( prompt , default ) reply = self . readline ( '' ) . strip ( ) . lower ( ) except EOFError : return default if reply in ( 'y' , 'yes' ) : return True elif reply in ( 'n' , 'no' ) : return False else : self . msg ( "Please answer y or n." ) pass pass return default
Called when a dangerous action is about to be done to make sure
        it's okay. `prompt' is printed; user response is returned.
Called when a dangerous action is about to be done to make sure it s okay . prompt is printed ; user response is returned .