def send_next_work(sock, works):
    try:
        work = works.next()
        sock.send_json(work)
    except __HOLE__:
        # If no more work is available, we still have to reply something.
        sock.send_json({})
dataset/ETHPy150Open mdup/easycluster/master.py/send_next_work