MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / confirm

Function confirm

keepercommander/utils.py:469–479  ·  view source on GitHub ↗

Simple confirmation through user input msg(str): Message expecting a yes or no answer Returns True if answer is "yes" and False otherwise.

(msg)

Source from the content-addressed store, hash-verified

467
468
469def confirm(msg):
470 """Simple confirmation through user input
471
472 msg(str): Message expecting a yes or no answer
473 Returns True if answer is "yes" and False otherwise.
474 """
475 question = f'{msg} (y/n) '
476 answer = ''
477 while answer not in ('y', 'n'):
478 answer = input(question).lower()
479 return answer == 'y'
480
481
482def size_to_str(size): # type: (int) -> str

Callers 3

sync_problem_vaultsMethod · 0.85
confirm_syncMethod · 0.85
executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected