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