(
    command_args,  # type: List[str]
    command_output,  # type: str
)
return text
Format command information for logging.
Format command information for logging.
Format command information for logging .
def format_command_result(
    command_args,  # type: List[str]
    command_output,  # type: str
):
    # type: (...) -> str
    """
    Format command information for logging.
    """
    command_desc = format_command_args(command_args)
    text = 'Command arguments: {}\n'.format(command_desc)

    if not command_output:
        text += 'Command output: None'
    elif logger.getEffectiveLevel() > logging.DEBUG:
        text += 'Command output: [use --verbose to show]'
    else:
        if not command_output.endswith('\n'):
            command_output += '\n'
        text += 'Command output:\n{}{}'.format(command_output, LOG_DIVIDER)

    return text
def format_command_result ( command_args , # type: List[str] command_output , # type: str ) : # type: (...) -> str command_desc = format_command_args ( command_args ) text = 'Command arguments: {}\n' . format ( command_desc ) if not command_output : text += 'Command output: None' elif logger . getEffectiveLevel ( ) > logging . DEBUG : text += 'Command output: [use --verbose to show]' else : if not command_output . endswith ( '\n' ) : command_output += '\n' text += 'Command output:\n{}{}' . format ( command_output , LOG_DIVIDER ) return text