def warn(self, db_name): """Print out a warning that we are about to wipe ``db_name``. Prompts the user to confirm this deletion. If the ``--force`` flag is used, this check is skipped. :param str db_name: The name of the database to delete. """ if not self.force: print CLIColor.underline( CLIColor.fail('WARNING!!! You are about wipe the ' '{} database!'.format(db_name))) cont = '' while cont == '': cont = raw_input('Do you want to continue? (yes/no): ') if cont[0] not in ('y', 'Y'): # if the answer doesn't start with y print ('Exiting...') exit(1)