made the python client more robust against queued death

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>