def _get_pid(self):
        '''
        Get our current pid from the pidfile and fall back
        to os.getpid() if pidfile not present (in foreground mode)
        '''
        pid = None

        try:
            pidf = file(self.pidfile, 'r')
            pid = int(pidf.read().strip())
            pidf.close()
        except __HOLE__:
            pid = os.getpid()
        return pid
dataset/ETHPy150Open felskrone/salt-eventsd/salteventsd/daemon.py/SaltEventsDaemon._get_pid