def __init__(self, server, pid):
        self._pid = pid
        self.server = IDroneModelServer(server)
        self._created = time.time()
        #don't set self._process
        try:
            try: #re-constructing, can cause problems with this
                if IKittNullProcess.providedBy(self.process.process):
                    raise InvalidProcess("Invalid PID (%s)" % pid)
            except __HOLE__:
                if isinstance(self.process, NullProcess):
                    raise InvalidProcess("Invalid PID (%s)" % pid)
                raise #re-raise do avoid ending up in a pickle, literally
        except InvalidProcess:
            if config.HOSTNAME == self.server.hostname:
                AppProcess.delete(self) #make sure we are invalid
                raise InvalidProcess("Invalid PID (%s)" % pid)
        except IOError: #linux and solaris kitt.proc.LiveProcess use files
            AppProcess.delete(self) #make sure we are invalid
            raise InvalidProcess("Invalid PID (%s)" % pid)
        except:
            err('wtf happened here .. seriously i do not know!!!')
            AppProcess.delete(self) #make sure we are invalid
            raise
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/models/app.py/AppProcess.__init__