def _pass_eof(self, fut):
    if not self._done:
      raise RuntimeError('QueueFuture cannot pass EOF until done.')
    exc = self.get_exception()
    if exc is not None:
      tb = self.get_traceback()
    else:
      exc = EOFError('Queue is empty')
      tb = None
    self._pass_result(fut, exc, tb, None)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/tasklets.py/QueueFuture._pass_eof/original