'Error out in case of an attempt to interact in noninteractive mode'

def _interaction_fail(self, message, cli_flag, extra=''):

    msg = 'Missing    command    line    flag    or    config    entry    for    this    setting:\n'
    msg += message
    if extra:
        msg += ('\n' + extra)
    if cli_flag:
        msg += '\n\n(You    can    set    this    with    the    {0}    flag)'.format(cli_flag)
    raise errors.MissingCommandlineFlag(msg)
