highfive/jobs.py
def get_job(self):
        """
        Gets a job from the job set if one is queued. The jobs_available()
        method should be consulted first to determine if a job can be obtained
        from a call to this method. If no jobs are available, an IndexError is
        raised.
        """

        if len(self._return_queue) > 0:
            return self._return_queue.popleft()
        elif self._on_deck is not None:
            job = self._on_deck
            self._load_job()
            return job
        else:
            raise IndexError("no jobs available")
def get_job(self):
        """
        Gets a job from the job set if one is queued. The jobs_available()
        method should be consulted first to determine if a job can be obtained
        from a call to this method. If no jobs are available, an IndexError is
        raised.
        """

        if len(self._return_queue) > 0:
            return self._return_queue.popleft()
        elif self._on_deck is not None:
            job = self._on_deck
            self._load_job()
            return job
        else:
            raise IndexError("no jobs available")
Gets a job from the job set if one is queued. The jobs_available()
        method should be consulted first to determine if a job can be obtained
        from a call to this method. If no jobs are available, an IndexError is
        raised.