def get_stdout()

in app/app.py [0:0]


def get_stdout(output):
    """
    Validates command output returncode and returns stdout
    :param output: the output of a subprocess
    :return the stdout of the subprocess output
    """
    logger.info(output)
    if output.returncode == 0:
        command_output = output.stdout
    else:
        raise Exception(f'Command failed for - stderr: {output.stderr} - '
                        f'returncode: {output.returncode}')

    return command_output