def read_pid(pidfile, logger):
    """Returns the pid in `pidfile` or None if the file doesn't exist."""
    _using_pidfile(pidfile, logger)
    try:
        return int(readfile(pidfile))
    except __HOLE__ as e:
        if e.errno == errno.ENOENT:
            logger.info("Daemon not running (no lockfile)")
            return None
        raise
dataset/ETHPy150Open facebook/sparts/sparts/daemon.py/read_pid