def client_info_callback(source_port, dest_ip, dest_port):
    """Called when client information is requested.

    Returns a list of pyblame.blame.Application's that are (potentially) responsible
    for the connection or None if no owner can be found.
    """
    try:
        proc = pyblame.util.find_connection_owner((None, source_port),
                (dest_ip, dest_port),
                relaxed=True)
        # API for cmdline changed in psutil 2.0.0, no reason to require >=2.0.0
        # so just work around it.
        if psutil.version_info[0] < 2:
            cmdline = proc.cmdline
        else:
            cmdline = proc.cmdline()
        # Use the exe and argv[1] to get a good idea of the program.
        # This handles the python case where argv[0] is python and argv[1] is
        # the script.
        cmd = " ".join(cmdline[:2])

        logger.info("Blame request for %s=>%s:%s owner:%s command:%s"
                % (source_port, dest_ip, dest_port, proc.pid, cmd))
        # TODO: Return a meaningful version code?
        return [pyblame.blame.Application(cmd, 0)]

    except ValueError:
        logger.info("Blame request for %s=>%s:%s unknown"
                % (source_port, dest_ip, dest_port))

    return None
Called when client information is requested.

    Returns a list of pyblame.blame.Application's that are (potentially) responsible
    for the connection or None if no owner can be found.
    
nogotofail/clients/linux/pyblame/__main__.py