def _parse_vnc_port(std_out):
    """Parse the VNC port number out of the standard output from mkvterm.

    :return:  The port number parsed otherwise None if no valid port
    """
    # The first line of the std_out should be the VNC port
    line = std_out.splitlines()[0] if std_out else None
    return int(line) if line and line.isdigit() else None