def _process_next_chunk()

in nailgun-client/py/ng.py [0:0]


    def _process_next_chunk(self):
        """
        Processes the next chunk from the nailgun server.
        """
        readable, exceptional = self.transport.select(SELECT_MAX_BLOCK_TIME_SEC)
        if readable:
            self._process_nailgun_stream()
        if exceptional:
            raise NailgunException(
                "Server disconnected in select", NailgunException.CONNECTION_BROKEN
            )

        # if daemon thread threw, rethrow here
        if self.shutdown_event.is_set():
            e = None
            e_tb = None
            with self.error_lock:
                e = self.error
                e_tb = self.error_traceback
            if e is not None:
                re_raise(e, e_tb)