def get_exit_code(self, wait=True):
        """returns the exitcode.
		If wait is False and the worker has not finishef yet, return None."""
        if self.state != self.STATE_INIT:
            if self.worker is None:
                # temp fix for pipes for fast commands
                if not wait:
                    return 0
                while self.worker is None:
                    time.sleep(0.01)
            if wait and self.worker.is_alive():
                self.worker.join()
                self.state = self.STATE_FINISHED
            elif self.worker.status() != self.worker.STOPPED:
                return None
            es = self.worker.state.return_value
            return _get_status(es, self.worker.killer)
        raise RuntimeError("get_exit_code() called before run()!")
returns the exitcode.
		If wait is False and the worker has not finishef yet, return None.
lib/mlpatches/os_popen.py