def prompt_and_delete_repo(repo_dir, no_input=False):
 if no_input:
  ok_to_delete = True
 else:
  question = u"You've cloned {} before. Is it okay to delete and re-clone it?".format(repo_dir)
  ok_to_delete = read_user_yes_no(question, u'yes')
 if ok_to_delete:
  rmtree(repo_dir)
 else:
  sys.exit()

def prompt_and_delete_repo ( repo_dir , no_input = False ) : if no_input : ok_to_delete = True else : question = u"You've cloned {} before. Is it okay to delete and re-clone it?" . format ( repo_dir ) ok_to_delete = read_user_yes_no ( question , u'yes' ) if ok_to_delete : rmtree ( repo_dir ) else : sys . exit ( )
ask the user whether its okay to delete the previously-cloned repo .