def _unlock_builddir_exit(self, unlock_future, returncode=None): # Normally, async_unlock should not raise an exception here. unlock_future.cancelled() or unlock_future.result() if returncode is not None: if unlock_future.cancelled(): self.cancelled = True self._was_cancelled() else: self.returncode = returncode SpawnProcess._async_wait(self)
def _async_wait(self): """ Override _async_wait to asynchronously unlock self._build_dir when necessary. """ if self._build_dir is None: SpawnProcess._async_wait(self) elif self._build_dir_unlock is None: if self.returncode is None: raise asyncio.InvalidStateError('Result is not ready.') self._async_unlock_builddir(returncode=self.returncode)
def _unlock_builddir_exit(self, unlock_future, returncode=None): # Normally, async_unlock should not raise an exception here. unlock_future.result() if returncode is not None: self.returncode = returncode SpawnProcess._async_wait(self)